mirror of
https://gitea.com/actions/setup-node.git
synced 2024-11-25 11:39:32 +01:00
dbg
This commit is contained in:
parent
c8617ac6ae
commit
42746a4f3c
2 changed files with 7 additions and 0 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -12975,6 +12975,7 @@ const io = __importStar(__webpack_require__(1));
|
||||||
const tc = __importStar(__webpack_require__(533));
|
const tc = __importStar(__webpack_require__(533));
|
||||||
const path = __importStar(__webpack_require__(622));
|
const path = __importStar(__webpack_require__(622));
|
||||||
const semver = __importStar(__webpack_require__(280));
|
const semver = __importStar(__webpack_require__(280));
|
||||||
|
const fs = __webpack_require__(747);
|
||||||
function getNode(versionSpec, stable, token) {
|
function getNode(versionSpec, stable, token) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let osPlat = os.platform();
|
let osPlat = os.platform();
|
||||||
|
@ -13014,6 +13015,8 @@ 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(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(downloadPath));
|
||||||
|
|
|
@ -7,6 +7,7 @@ import * as tc from '@actions/tool-cache';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import {Url} from 'url';
|
import {Url} from 'url';
|
||||||
|
import fs = require('fs');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Node versions interface
|
// Node versions interface
|
||||||
|
@ -76,6 +77,9 @@ 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(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(downloadPath));
|
||||||
|
|
Loading…
Reference in a new issue