From 6a7d247afe96fbebaf76e697c30d96f84dc860f7 Mon Sep 17 00:00:00 2001 From: Matthew Hughes Date: Thu, 8 Feb 2024 10:53:51 +0000 Subject: [PATCH] fixup! Avoid Toolchain download before cache download --- src/main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index cebefca..e62b28b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -64,8 +64,11 @@ export async function run() { const goPath = await io.which('go'); // run `go version` with the bundled Go toolchain to avoid potentially // downloading one into the cache - const goVersion = (cp.execSync(`${goPath} version`) || '', - {env: {...process.env, GOTOOLCHAIN: 'local'}}).toString(); + const goVersion = ( + cp.execSync(`${goPath} version`, { + env: {...process.env, GOTOOLCHAIN: 'local'} + }) || '' + ).toString(); if (cache && isCacheFeatureAvailable()) { const packageManager = 'default';