From 1b2d431484f28d15efe4491ef07cb6ca2fc94eb5 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Sun, 3 May 2020 15:44:03 -0400 Subject: [PATCH] win change --- .github/workflows/proxy.yml | 4 ++-- dist/index.js | 4 +++- src/installer.ts | 7 ++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index 5f206c5b..ee09dbba 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -43,12 +43,12 @@ jobs: fail-fast: false env: https_proxy: http://no-such-proxy:3128 - no_proxy: github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com + no_proxy: api.github.com,github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com steps: - uses: actions/checkout@v2 - name: Clear tool cache run: rm -rf $RUNNER_TOOL_CACHE/* - - name: Setup node 10 + - name: Setup node 12 uses: ./ with: node-version: 10.x diff --git a/dist/index.js b/dist/index.js index eb529754..12fd7a37 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13014,7 +13014,9 @@ function getNode(versionSpec, stable, token) { let extPath; if (osPlat == 'win32') { let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe'); - extPath = yield tc.extract7z(downloadPath, undefined, _7zPath); + // 7z extracts to filename folder + const srcPath = path.join(downloadPath, `node-v${info.resolvedVersion}-win-${osArch}`); + extPath = yield tc.extract7z(srcPath, undefined, _7zPath); } else { extPath = yield tc.extractTar(downloadPath, undefined, [ diff --git a/src/installer.ts b/src/installer.ts index 00bc64fc..60435362 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -75,7 +75,12 @@ export async function getNode( let extPath: string; if (osPlat == 'win32') { let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe'); - extPath = await tc.extract7z(downloadPath, undefined, _7zPath); + // 7z extracts to filename folder + const srcPath = path.join( + downloadPath, + `node-v${info.resolvedVersion}-win-${osArch}` + ); + extPath = await tc.extract7z(srcPath, undefined, _7zPath); } else { extPath = await tc.extractTar(downloadPath, undefined, [ 'xz',