From a4145577de7201cb8f573a9371c24a229bb7167c Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Sun, 3 May 2020 16:34:20 -0400 Subject: [PATCH] dbg --- dist/index.js | 5 +++-- src/installer.ts | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index bbdbd967..fd6e5dd3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13015,11 +13015,12 @@ function getNode(versionSpec, stable, token) { let extPath; if (osPlat == 'win32') { 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))); extPath = yield tc.extract7z(downloadPath, undefined, _7zPath); // 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 { extPath = yield tc.extractTar(downloadPath, undefined, [ diff --git a/src/installer.ts b/src/installer.ts index 61400a38..942d2441 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -77,12 +77,19 @@ export async function getNode( if (osPlat == 'win32') { 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))); extPath = await tc.extract7z(downloadPath, undefined, _7zPath); // 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 { extPath = await tc.extractTar(downloadPath, undefined, [ 'xz',