diff --git a/dist/index.js b/dist/index.js index 3020b3e..87a1a02 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1320,7 +1320,7 @@ function run() { console.log(`##[add-matcher]${matchersPath}`); // output the version actually being used let goPath = yield io.which('go'); - let goVersion = child_process_1.default.execSync(`${goPath} version`); + let goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString(); console.log(goVersion); } catch (error) { diff --git a/src/main.ts b/src/main.ts index 1e31578..d693deb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -53,7 +53,7 @@ export async function run() { // output the version actually being used let goPath = await io.which('go'); - let goVersion = cp.execSync(`${goPath} version`); + let goVersion = (cp.execSync(`${goPath} version`) || '').toString(); console.log(goVersion); } catch (error) {