From be35395a9d8a987b60bc1d20b4dbd72141384037 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 5 Feb 2024 18:40:43 +0100 Subject: [PATCH] chore: generate --- dist/post_run/index.js | 5 ++++- dist/run/index.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index 8d68dae..e30bfe2 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -707,7 +707,10 @@ function assertDefined(name, value) { exports.assertDefined = assertDefined; function isGhes() { 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 isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST'); + return !isGitHubHost && !isGheHost; } exports.isGhes = isGhes; //# sourceMappingURL=cacheUtils.js.map diff --git a/dist/run/index.js b/dist/run/index.js index 8ba3171..f0f3f70 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -707,7 +707,10 @@ function assertDefined(name, value) { exports.assertDefined = assertDefined; function isGhes() { 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 isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST'); + return !isGitHubHost && !isGheHost; } exports.isGhes = isGhes; //# sourceMappingURL=cacheUtils.js.map