1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-go synced 2025-06-20 08:58:01 +02:00

test hosted version of go

This commit is contained in:
Sergey Dolin 2023-07-12 10:15:20 +02:00
parent 96a955403c
commit 60dde965e0
3 changed files with 27 additions and 9 deletions

View file

@ -189,7 +189,6 @@ async function installGoVersion(
// Windows requires that we keep the extension (.zip) for extraction
const isWindows = os.platform() === 'win32';
const tempDir = process.env.RUNNER_TEMP || '.';
const fileName = isWindows ? path.join(tempDir, info.fileName) : undefined;
@ -204,8 +203,8 @@ async function installGoVersion(
// for github hosted windows runner handle latency of OS drive
// by avoiding write operations to C:
const isHosted = (process.env['RUNNER_ENVIRONMENT'] = 'github-hosted');
if (isWindows && isHosted) {
const isHosted = process.env['RUNNER_ENVIRONMENT'] === 'github-hosted';
if (isWindows && isHosted && fs.existsSync('d:\\') && fs.existsSync('c:\\')) {
const defaultToolCacheRoot = process.env['RUNNER_TOOL_CACHE'] || '';
const substitutedToolCacheRoot = defaultToolCacheRoot
.replace('C:', 'D:')