mirror of
https://gitea.com/actions/setup-node.git
synced 2024-11-25 11:39:32 +01:00
win change
This commit is contained in:
parent
5e5ef8fd55
commit
1b2d431484
3 changed files with 11 additions and 4 deletions
4
.github/workflows/proxy.yml
vendored
4
.github/workflows/proxy.yml
vendored
|
@ -43,12 +43,12 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
https_proxy: http://no-such-proxy:3128
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Clear tool cache
|
- name: Clear tool cache
|
||||||
run: rm -rf $RUNNER_TOOL_CACHE/*
|
run: rm -rf $RUNNER_TOOL_CACHE/*
|
||||||
- name: Setup node 10
|
- name: Setup node 12
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 10.x
|
||||||
|
|
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -13014,7 +13014,9 @@ function getNode(versionSpec, stable, token) {
|
||||||
let extPath;
|
let extPath;
|
||||||
if (osPlat == 'win32') {
|
if (osPlat == 'win32') {
|
||||||
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
|
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 {
|
else {
|
||||||
extPath = yield tc.extractTar(downloadPath, undefined, [
|
extPath = yield tc.extractTar(downloadPath, undefined, [
|
||||||
|
|
|
@ -75,7 +75,12 @@ export async function getNode(
|
||||||
let extPath: string;
|
let extPath: string;
|
||||||
if (osPlat == 'win32') {
|
if (osPlat == 'win32') {
|
||||||
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
|
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 {
|
} else {
|
||||||
extPath = await tc.extractTar(downloadPath, undefined, [
|
extPath = await tc.extractTar(downloadPath, undefined, [
|
||||||
'xz',
|
'xz',
|
||||||
|
|
Loading…
Reference in a new issue