Revert "Refine isGhes logic (#697)"

This reverts commit 8df1039502.
This commit is contained in:
alphachart 2024-11-14 13:19:25 +03:30 committed by GitHub
parent 8df1039502
commit fa731dd19e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 57 deletions

6
dist/setup/index.js vendored
View file

@ -126328,11 +126328,7 @@ function isJobStatusSuccess() {
exports.isJobStatusSuccess = isJobStatusSuccess;
function isGhes() {
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
const isGitHubHost = hostname === 'GITHUB.COM';
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
const isLocalHost = hostname.endsWith('.LOCALHOST');
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
}
exports.isGhes = isGhes;
function isCacheFeatureAvailable() {