From d47eadc0ffb2c388c47b94a91d5f3dd8bb5e408c Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 29 Jun 2020 13:53:11 +0300 Subject: [PATCH] fix adding to bin path --- __tests__/setup-go.test.ts | 2 +- dist/index.js | 3 ++- src/main.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts index 8ae2dd4..9007c81 100644 --- a/__tests__/setup-go.test.ts +++ b/__tests__/setup-go.test.ts @@ -3,7 +3,7 @@ import * as io from '@actions/io'; import * as tc from '@actions/tool-cache'; import fs from 'fs'; import cp from 'child_process'; -import osm = require('os'); +import osm from 'os'; import path from 'path'; import * as main from '../src/main'; import * as im from '../src/installer'; diff --git a/dist/index.js b/dist/index.js index 1dfb2ff..2689cf3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1444,7 +1444,8 @@ function run() { core.exportVariable('GOROOT', installDir); core.addPath(path_1.default.join(installDir, 'bin')); core.info('Added go to the path'); - let added = addBinToPath(); + let added = yield addBinToPath(); + core.debug(`add bin ${added}`); core.info(`Successfully setup go version ${versionSpec}`); } // add problem matchers diff --git a/src/main.ts b/src/main.ts index f68b77e..2d90b2f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,7 +30,8 @@ export async function run() { core.addPath(path.join(installDir, 'bin')); core.info('Added go to the path'); - let added = addBinToPath(); + let added = await addBinToPath(); + core.debug(`add bin ${added}`); core.info(`Successfully setup go version ${versionSpec}`); }