mirror of
https://github.com/actions/setup-go.git
synced 2025-05-04 14:14:34 +00:00
Update self-hosted environment validation and bump undici version (#556)
* Fix self-hosted environment check * Update isSelfHosted logic
This commit is contained in:
14
dist/setup/index.js
vendored
14
dist/setup/index.js
vendored
@ -93353,8 +93353,7 @@ function cacheWindowsDir(extPath, tool, version, arch) {
|
||||
if (os_1.default.platform() !== 'win32')
|
||||
return false;
|
||||
// make sure the action runs in the hosted environment
|
||||
if (process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
process.env['AGENT_ISSELFHOSTED'] === '1')
|
||||
if ((0, utils_1.isSelfHosted)())
|
||||
return false;
|
||||
const defaultToolCacheRoot = process.env['RUNNER_TOOL_CACHE'];
|
||||
if (!defaultToolCacheRoot)
|
||||
@ -93861,12 +93860,21 @@ exports.getArch = getArch;
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.StableReleaseAlias = void 0;
|
||||
exports.isSelfHosted = exports.StableReleaseAlias = void 0;
|
||||
var StableReleaseAlias;
|
||||
(function (StableReleaseAlias) {
|
||||
StableReleaseAlias["Stable"] = "stable";
|
||||
StableReleaseAlias["OldStable"] = "oldstable";
|
||||
})(StableReleaseAlias || (exports.StableReleaseAlias = StableReleaseAlias = {}));
|
||||
const isSelfHosted = () => process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
(process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined);
|
||||
exports.isSelfHosted = isSelfHosted;
|
||||
/* the above is simplified from:
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
||
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined
|
||||
*/
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
Reference in New Issue
Block a user