mirror of
https://github.com/actions/setup-go.git
synced 2025-09-08 11:13:38 -06:00
Add unit tests
This commit is contained in:
parent
6f72b31c94
commit
deaf43692d
7 changed files with 114 additions and 78 deletions
|
@ -7,11 +7,4 @@ export enum StableReleaseAlias {
|
|||
|
||||
export const isSelfHosted = (): boolean =>
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
process.env['AGENT_ISSELFHOSTED'] === '1';
|
||||
|
||||
export const getCacheInput = (): boolean => {
|
||||
// for self-hosted environment turn off cache by default
|
||||
if (isSelfHosted() && core.getInput('cache') === '') return false;
|
||||
|
||||
return core.getBooleanInput('cache');
|
||||
};
|
||||
process.env['AGENT_ISSELFHOSTED'] !== '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue