From 1ab52e0a0cc5cfdcbfc0dfe831a5107577f7654e Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Wed, 18 Sep 2024 17:20:11 +0300 Subject: [PATCH] check --- src/main/osinstaller/CxInstaller.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/osinstaller/CxInstaller.ts b/src/main/osinstaller/CxInstaller.ts index bc901308..57371ff9 100644 --- a/src/main/osinstaller/CxInstaller.ts +++ b/src/main/osinstaller/CxInstaller.ts @@ -120,8 +120,8 @@ export class CxInstaller { try { console.log(`Downloading from: ${url}`); - await downloadFile(url, "/resources"); - console.log(`Downloaded to: /resources`); + await downloadFile(url, outputPath); + console.log(`Downloaded to: ${outputPath}`); // Now extract the downloaded archive } catch (error) { @@ -191,8 +191,7 @@ async function downloadFile(downloadURLPath: string, filePath: string): Promise< responseType: 'stream' }); // Create the file stream at the specified filePath - let check =process.cwd()+"/src/main/wrapper/resources/cx" - const fileStream = createWriteStream(check); + const fileStream = createWriteStream(process.cwd()+"/src/main/wrapper/resources/cx"); // Pipe the response data to the file response.data.pipe(fileStream);