From 597f01d0338c902ac29406815e72bdba478bc669 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 6 Nov 2023 09:16:58 -0500 Subject: [PATCH] Only check basename for file extension when downloading binaries Fixes #3527 Signed-off-by: David Thompson --- src/downloadUtil/downloadBinaries.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/downloadUtil/downloadBinaries.ts b/src/downloadUtil/downloadBinaries.ts index 3a275acd2..1dbb6f7ab 100644 --- a/src/downloadUtil/downloadBinaries.ts +++ b/src/downloadUtil/downloadBinaries.ts @@ -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);