From f5883d0b6126c00cfc64d68504f0a2ffe6681b26 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:44:30 +0100 Subject: [PATCH] Fix #177, Tools download fails to detect archive extension Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- src/utils/download.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/download.mts b/src/utils/download.mts index 5fb4b83..e2c751b 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -205,7 +205,7 @@ export async function downloadAndInstallArchive( extraHeaders?: { [key: string]: string }, progressCallback?: (progress: Progress) => void ): Promise { - // Check if the SDK is already installed + // Check if already installed if ( existsSync(targetDirectory) && readdirSync(targetDirectory).length !== 0 @@ -218,7 +218,7 @@ export async function downloadAndInstallArchive( // Ensure the target directory exists await mkdir(targetDirectory, { recursive: true }); - const archiveExtension = getArchiveExtension(url); + const archiveExtension = getArchiveExtension(archiveFileName); if (!archiveExtension) { Logger.error( LoggerSource.downloader,