add comment

This commit is contained in:
Dmitry Shibanov 2023-12-21 15:51:19 +01:00
parent e2ed1fea6d
commit 1f96ccb994
2 changed files with 10 additions and 0 deletions

5
dist/setup/index.js vendored
View file

@ -93199,6 +93199,11 @@ class BaseDistribution {
info = info || {}; // satisfy compiler, never null when reaches here
if (this.osPlat == 'win32') {
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') {
const renamedArchive = `${downloadPath}.zip`;
fs_1.default.renameSync(downloadPath, renamedArchive);

View file

@ -220,6 +220,11 @@ export default abstract class BaseDistribution {
info = info || ({} as INodeVersionInfo); // satisfy compiler, never null when reaches here
if (this.osPlat == 'win32') {
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') {
const renamedArchive = `${downloadPath}.zip`;
fs.renameSync(downloadPath, renamedArchive);