Properly kill the download process on non-Windows systems

This commit is contained in:
Pierce Thompson
2023-06-27 23:01:13 -04:00
parent aa6e2488df
commit 338391f9ac
+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);
});
}