From c8bb87e0368948ac0a196f6c351f4e3959f8ea7d Mon Sep 17 00:00:00 2001 From: MOREL Matthieu Date: Thu, 26 Aug 2021 22:15:58 +0200 Subject: [PATCH] up --- src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 9f304f4..2d90b2f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,11 +40,12 @@ export async function run() { core.info(`##[add-matcher]${matchersPath}`); // output the version actually being used - let goVersion = (cp.execSync(`go version`) || '').toString(); + let goPath = await io.which('go'); + let goVersion = (cp.execSync(`${goPath} version`) || '').toString(); core.info(goVersion); core.startGroup('go env'); - let goEnv = (cp.execSync(`go env`) || '').toString(); + let goEnv = (cp.execSync(`${goPath} env`) || '').toString(); core.info(goEnv); core.endGroup(); } catch (error) {