mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-12-25 03:55:50 +00:00
win change
This commit is contained in:
parent
1b2d431484
commit
c8617ac6ae
2 changed files with 7 additions and 9 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -13014,9 +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');
|
||||||
// 7z extracts to filename folder
|
extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
|
||||||
const srcPath = path.join(downloadPath, `node-v${info.resolvedVersion}-win-${osArch}`);
|
// 7z extracts to folder matching file name
|
||||||
extPath = yield tc.extract7z(srcPath, undefined, _7zPath);
|
extPath = path.join(extPath, path.basename(downloadPath));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
extPath = yield tc.extractTar(downloadPath, undefined, [
|
extPath = yield tc.extractTar(downloadPath, undefined, [
|
||||||
|
|
|
@ -75,12 +75,10 @@ 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');
|
||||||
// 7z extracts to filename folder
|
|
||||||
const srcPath = path.join(
|
extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
|
||||||
downloadPath,
|
// 7z extracts to folder matching file name
|
||||||
`node-v${info.resolvedVersion}-win-${osArch}`
|
extPath = path.join(extPath, path.basename(downloadPath));
|
||||||
);
|
|
||||||
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