mirror of
https://github.com/actions/setup-go.git
synced 2025-07-17 22:39:23 +02:00
Update self-hosted environment validation and bump undici version (#556)
* Fix self-hosted environment check * Update isSelfHosted logic
This commit is contained in:
10
src/utils.ts
10
src/utils.ts
@@ -2,3 +2,13 @@ export enum StableReleaseAlias {
|
||||
Stable = 'stable',
|
||||
OldStable = 'oldstable'
|
||||
}
|
||||
|
||||
export const isSelfHosted = (): boolean =>
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
(process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined);
|
||||
/* 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