Update self-hosted environment validation and bump undici version (#556)

* Fix self-hosted environment check

* Update isSelfHosted logic
This commit is contained in:
Priya Gupta
2025-04-01 21:02:30 +05:30
committed by GitHub
parent 691cc3533f
commit dca8468d37
4 changed files with 75 additions and 9 deletions

View File

@@ -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
*/