ran `npm run format`

This commit is contained in:
John Wesley Walker III 2024-10-18 13:33:10 +00:00
parent 0beadebc68
commit 1e08474f57
2 changed files with 10 additions and 6 deletions

6
dist/setup/index.js vendored
View File

@ -92017,7 +92017,11 @@ function validatePythonVersionFormatForPyPy(version) {
exports.validatePythonVersionFormatForPyPy = validatePythonVersionFormatForPyPy; exports.validatePythonVersionFormatForPyPy = validatePythonVersionFormatForPyPy;
function isGhes() { function isGhes() {
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
return ghUrl.hostname.toUpperCase() !== '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;
} }
exports.isGhes = isGhes; exports.isGhes = isGhes;
function isCacheFeatureAvailable() { function isCacheFeatureAvailable() {

View File

@ -117,12 +117,12 @@ export function isGhes(): boolean {
process.env['GITHUB_SERVER_URL'] || 'https://github.com' process.env['GITHUB_SERVER_URL'] || 'https://github.com'
); );
const hostname = ghUrl.hostname.trimEnd().toUpperCase() const hostname = ghUrl.hostname.trimEnd().toUpperCase();
const isGitHubHost = hostname === 'GITHUB.COM' const isGitHubHost = hostname === 'GITHUB.COM';
const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM') const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
const isLocalHost = hostname.endsWith('.LOCALHOST') const isLocalHost = hostname.endsWith('.LOCALHOST');
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
} }
export function isCacheFeatureAvailable(): boolean { export function isCacheFeatureAvailable(): boolean {