Merge pull request #258 from Insprill/fix/kill-download-process

Properly kill the download process on non-Windows systems
This commit is contained in:
MathieuG-P
2023-06-28 09:31:21 +02:00
committed by GitHub
+5 -2
View File
@@ -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);
});
}