mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Fix exit code for commands terminated by signals
Fixes https://github.com/pre-commit/pre-commit/issues/2970
This commit is contained in:
parent
a1f1d19156
commit
5a4b5b1f8e
2 changed files with 11 additions and 1 deletions
|
|
@ -170,7 +170,8 @@ def xargs(
|
|||
results = thread_map(run_cmd_partition, partitions)
|
||||
|
||||
for proc_retcode, proc_out, _ in results:
|
||||
retcode = max(retcode, proc_retcode)
|
||||
if abs(proc_retcode) > abs(retcode):
|
||||
retcode = proc_retcode
|
||||
stdout += proc_out
|
||||
|
||||
return retcode, stdout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue