mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-11-24 06:51:00 -05:00
dbg
This commit is contained in:
parent
42746a4f3c
commit
a4145577de
2 changed files with 12 additions and 4 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -13015,11 +13015,12 @@ 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');
|
||||||
console.log(`downloadPath: ${downloadPath}`);
|
console.log(`downloadPath: ${downloadPath}`, `isFile: ${fs.statSync(downloadPath).isFile()}`);
|
||||||
console.log(JSON.stringify(fs.statSync(downloadPath)));
|
console.log(JSON.stringify(fs.statSync(downloadPath)));
|
||||||
extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
|
extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
|
||||||
// 7z extracts to folder matching file name
|
// 7z extracts to folder matching file name
|
||||||
extPath = path.join(extPath, path.basename(downloadPath));
|
extPath = path.join(extPath, path.basename(info.fileName, '.7z'));
|
||||||
|
console.log(`extPath: ${extPath}`, `isDirectory: ${fs.statSync(extPath).isDirectory()}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
extPath = yield tc.extractTar(downloadPath, undefined, [
|
extPath = yield tc.extractTar(downloadPath, undefined, [
|
||||||
|
|
|
@ -77,12 +77,19 @@ export async function getNode(
|
||||||
if (osPlat == 'win32') {
|
if (osPlat == 'win32') {
|
||||||
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
|
let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
|
||||||
|
|
||||||
console.log(`downloadPath: ${downloadPath}`);
|
console.log(
|
||||||
|
`downloadPath: ${downloadPath}`,
|
||||||
|
`isFile: ${fs.statSync(downloadPath).isFile()}`
|
||||||
|
);
|
||||||
console.log(JSON.stringify(fs.statSync(downloadPath)));
|
console.log(JSON.stringify(fs.statSync(downloadPath)));
|
||||||
|
|
||||||
extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
|
extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
|
||||||
// 7z extracts to folder matching file name
|
// 7z extracts to folder matching file name
|
||||||
extPath = path.join(extPath, path.basename(downloadPath));
|
extPath = path.join(extPath, path.basename(info.fileName, '.7z'));
|
||||||
|
console.log(
|
||||||
|
`extPath: ${extPath}`,
|
||||||
|
`isDirectory: ${fs.statSync(extPath).isDirectory()}`
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
extPath = await tc.extractTar(downloadPath, undefined, [
|
extPath = await tc.extractTar(downloadPath, undefined, [
|
||||||
'xz',
|
'xz',
|
||||||
|
|
Loading…
Reference in a new issue