Fix exitcode
store_config deletes error-related keys
This commit is contained in:
parent
11ca2b6b85
commit
17eb487582
1 changed files with 7 additions and 4 deletions
11
wither.py
11
wither.py
|
|
@ -302,14 +302,17 @@ def run() -> int:
|
|||
assert_config(config)
|
||||
config_new = purge(config)
|
||||
printdbg(f"Concluded with {config_new.error_count} non-fatal errors and fatal_error={config_new.fatal_error}")
|
||||
store_config(config_new)
|
||||
|
||||
if config_new.fatal_error:
|
||||
return 1
|
||||
ec = 1
|
||||
elif config_new.error_count > 0:
|
||||
return 2
|
||||
ec = 2
|
||||
else:
|
||||
return 0
|
||||
ec = 0
|
||||
|
||||
store_config(config_new)
|
||||
return ec
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(run())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue