mirror of
https://github.com/actions/setup-go.git
synced 2025-07-26 00:18:29 +02:00
Fix self-hosted environment check
This commit is contained in:
parent
5a083d0e9a
commit
a5bc5249cb
7 changed files with 114 additions and 15 deletions
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['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
(process.env['AGENT_ISSELFHOSTED'] === undefined &&
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted');
|
||||
/* the above is simplified from:
|
||||
process.env['RUNNER_ENVIRONMENT'] === undefined && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined && process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted'
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue