mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-18 14:02:11 +00:00
fix(auto-update): stop after signaled subprocesses
This commit is contained in:
1 parent
d2ef268059
commit
ca422f3c19
2 files changed
+136
-2
No files matched your search
@@ -174,9 +174,10 @@ function runExternalCommand(command, args, options = {}) {
|
||||
throw result.error;
|
||||
}
|
||||
|
||||
if (typeof result.status === 'number' && result.status !== 0) {
|
||||
if (result.status !== 0) {
|
||||
const errorOutput = (result.stderr || result.stdout || '').trim();
|
||||
throw new Error(`${command} ${args.join(' ')} failed${errorOutput ? `: ${errorOutput}` : ''}`);
|
||||
const failure = result.signal ? `was terminated by ${result.signal}` : 'failed';
|
||||
throw new Error(`${command} ${args.join(' ')} ${failure}${errorOutput ? `: ${errorOutput}` : ''}`);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user