mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Merge pull request #258 from Insprill/fix/kill-download-process
Properly kill the download process on non-Windows systems
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user