mirror of
https://github.com/actions/setup-node
synced 2025-04-17 05:33:13 +00:00
add comment
This commit is contained in:
parent
e2ed1fea6d
commit
1f96ccb994
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
@ -93199,6 +93199,11 @@ class BaseDistribution {
|
|||||||
info = info || {}; // satisfy compiler, never null when reaches here
|
info = info || {}; // satisfy compiler, never null when reaches here
|
||||||
if (this.osPlat == 'win32') {
|
if (this.osPlat == 'win32') {
|
||||||
const extension = this.nodeInfo.arch === 'arm64' ? '.zip' : '.7z';
|
const extension = this.nodeInfo.arch === 'arm64' ? '.zip' : '.7z';
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
if (extension === '.zip') {
|
if (extension === '.zip') {
|
||||||
const renamedArchive = `${downloadPath}.zip`;
|
const renamedArchive = `${downloadPath}.zip`;
|
||||||
fs_1.default.renameSync(downloadPath, renamedArchive);
|
fs_1.default.renameSync(downloadPath, renamedArchive);
|
||||||
|
@ -220,6 +220,11 @@ export default abstract class BaseDistribution {
|
|||||||
info = info || ({} as INodeVersionInfo); // satisfy compiler, never null when reaches here
|
info = info || ({} as INodeVersionInfo); // satisfy compiler, never null when reaches here
|
||||||
if (this.osPlat == 'win32') {
|
if (this.osPlat == 'win32') {
|
||||||
const extension = this.nodeInfo.arch === 'arm64' ? '.zip' : '.7z';
|
const extension = this.nodeInfo.arch === 'arm64' ? '.zip' : '.7z';
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
if (extension === '.zip') {
|
if (extension === '.zip') {
|
||||||
const renamedArchive = `${downloadPath}.zip`;
|
const renamedArchive = `${downloadPath}.zip`;
|
||||||
fs.renameSync(downloadPath, renamedArchive);
|
fs.renameSync(downloadPath, renamedArchive);
|
||||||
|
Loading…
Reference in New Issue
Block a user