no proxy fix

pull/157/head
Bryan MacFarlane 2020-05-03 18:40:24 -04:00
parent 5e7b076d00
commit a80a170798
3 changed files with 1 additions and 17 deletions

View File

@ -53,4 +53,4 @@ jobs:
with: with:
node-version: 11 node-version: 11
- name: Verify node and npm - name: Verify node and npm
run: __tests__/verify-node.sh 10 run: __tests__/verify-node.sh 11

7
dist/index.js vendored
View File

@ -13013,22 +13013,15 @@ function getNode(versionSpec, stable, token) {
// //
// Extract // Extract
// //
console.log(`Extracting ${downloadPath}`);
if (!fs.existsSync(downloadPath)) {
console.log('File not downloaded correctly');
}
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); extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
console.log(`contents of ${extPath}`);
console.log(extPath);
// 7z extracts to folder matching file name // 7z extracts to folder matching file name
let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z')); let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));
if (fs.existsSync(nestedPath)) { if (fs.existsSync(nestedPath)) {
extPath = nestedPath; extPath = nestedPath;
} }
console.log(`using ${extPath}`);
} }
else { else {
extPath = yield tc.extractTar(downloadPath, undefined, [ extPath = yield tc.extractTar(downloadPath, undefined, [

View File

@ -74,24 +74,15 @@ export async function getNode(
// //
// Extract // Extract
// //
console.log(`Extracting ${downloadPath}`);
if (!fs.existsSync(downloadPath)) {
console.log('File not downloaded correctly');
}
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); extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
console.log(`contents of ${extPath}`);
console.log(extPath);
// 7z extracts to folder matching file name // 7z extracts to folder matching file name
let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z')); let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));
if (fs.existsSync(nestedPath)) { if (fs.existsSync(nestedPath)) {
extPath = nestedPath; extPath = nestedPath;
} }
console.log(`using ${extPath}`);
} else { } else {
extPath = await tc.extractTar(downloadPath, undefined, [ extPath = await tc.extractTar(downloadPath, undefined, [
'xz', 'xz',