mirror of
https://github.com/actions/setup-node.git
synced 2024-11-12 09:38:04 +00:00
Compare commits
1 Commits
b7480e6723
...
d715468aa8
Author | SHA1 | Date | |
---|---|---|---|
|
d715468aa8 |
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
@ -93883,7 +93883,7 @@ class BaseDistribution {
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
const toolPath = yield this.extractArchive(downloadPath, info, true);
|
||||
const toolPath = yield this.extractArchive(downloadPath, info);
|
||||
core.info('Done');
|
||||
return toolPath;
|
||||
});
|
||||
@ -93933,7 +93933,7 @@ class BaseDistribution {
|
||||
return toolPath;
|
||||
});
|
||||
}
|
||||
extractArchive(downloadPath, info, isOfficialArchive) {
|
||||
extractArchive(downloadPath, info) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
//
|
||||
// Extract
|
||||
@ -93948,7 +93948,7 @@ class BaseDistribution {
|
||||
// on Windows runners without PowerShell Core.
|
||||
//
|
||||
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||
if (extension === '.zip' && isOfficialArchive) {
|
||||
if (extension === '.zip') {
|
||||
const renamedArchive = `${downloadPath}.zip`;
|
||||
fs_1.default.renameSync(downloadPath, renamedArchive);
|
||||
extPath = yield tc.extractZip(renamedArchive);
|
||||
@ -94186,7 +94186,7 @@ class OfficialBuilds extends base_distribution_1.default {
|
||||
core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
|
||||
downloadPath = yield tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.auth);
|
||||
if (downloadPath) {
|
||||
toolPath = yield this.extractArchive(downloadPath, versionInfo, false);
|
||||
toolPath = yield this.extractArchive(downloadPath, versionInfo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@ -4429,12 +4429,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"braces": "^3.0.2",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -150,7 +150,7 @@ export default abstract class BaseDistribution {
|
||||
throw err;
|
||||
}
|
||||
|
||||
const toolPath = await this.extractArchive(downloadPath, info, true);
|
||||
const toolPath = await this.extractArchive(downloadPath, info);
|
||||
core.info('Done');
|
||||
|
||||
return toolPath;
|
||||
@ -210,8 +210,7 @@ export default abstract class BaseDistribution {
|
||||
|
||||
protected async extractArchive(
|
||||
downloadPath: string,
|
||||
info: INodeVersionInfo | null,
|
||||
isOfficialArchive?: boolean
|
||||
info: INodeVersionInfo | null
|
||||
) {
|
||||
//
|
||||
// Extract
|
||||
@ -226,7 +225,7 @@ export default abstract class BaseDistribution {
|
||||
// on Windows runners without PowerShell Core.
|
||||
//
|
||||
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||
if (extension === '.zip' && isOfficialArchive) {
|
||||
if (extension === '.zip') {
|
||||
const renamedArchive = `${downloadPath}.zip`;
|
||||
fs.renameSync(downloadPath, renamedArchive);
|
||||
extPath = await tc.extractZip(renamedArchive);
|
||||
|
@ -88,11 +88,7 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
);
|
||||
|
||||
if (downloadPath) {
|
||||
toolPath = await this.extractArchive(
|
||||
downloadPath,
|
||||
versionInfo,
|
||||
false
|
||||
);
|
||||
toolPath = await this.extractArchive(downloadPath, versionInfo);
|
||||
}
|
||||
} else {
|
||||
core.info(
|
||||
|
Loading…
Reference in New Issue
Block a user