From 338391f9acc4beff236e05a61772c9b0249a8ab1 Mon Sep 17 00:00:00 2001 From: Pierce Thompson Date: Tue, 27 Jun 2023 23:01:13 -0400 Subject: [PATCH] Properly kill the download process on non-Windows systems --- src/main/services/bs-installer.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/services/bs-installer.service.ts b/src/main/services/bs-installer.service.ts index 8bd086a5..3c38aa81 100644 --- a/src/main/services/bs-installer.service.ts +++ b/src/main/services/bs-installer.service.ts @@ -67,8 +67,11 @@ export class BSInstallerService{ if(this.downloadProcess?.killed && !this.downloadProcess?.pid){ return resolve(false); } this.downloadProcess.once('exit', () => resolve(true)); - - ctrlc(this.downloadProcess.pid); + if (process.platform === 'win32') { + ctrlc(this.downloadProcess.pid); + } else { + this.downloadProcess.kill(); + } setTimeout(() => resolve(false), 3000); }); }