Skip to content

Commit

Permalink
Only check basename for file extension when downloading binaries
Browse files Browse the repository at this point in the history
Fixes #3527

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Nov 6, 2023
1 parent 9538f7f commit 597f01d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/downloadUtil/downloadBinaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ async function extractTool(toolsFolder: string, platform: PlatformData, currentF
toolLocation = path.join(toolsFolder, platform.cmdFileName);
}
console.log(`Extracting ${currentFile} to ${toolLocation}`);
if (!currentFile.endsWith('.exe') && currentFile.includes('.')) {
const fileBasename = path.basename(currentFile);
if (!fileBasename.endsWith('.exe') && fileBasename.includes('.')) {
await Archive.extract(currentFile, toolsFolder, platform.cmdFileName, platform.filePrefix);
} else {
fs.copyFileSync(currentFile, toolLocation);
Expand Down

0 comments on commit 597f01d

Please sign in to comment.