Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov committed Dec 21, 2023
1 parent e2ed1fe commit 1f96ccb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/distributions/base-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1f96ccb

Please sign in to comment.