TOOLS/docutils-wrapper: properly propagate failures

This commit is contained in:
Thomas Weißschuh 2023-03-06 18:00:57 +00:00 committed by Dudemanguy
parent d6f70ef96b
commit 375e527620
1 changed files with 4 additions and 1 deletions

View File

@ -55,8 +55,11 @@ for opt, optarg in zip(argv, argv[1:]):
depfile = optarg
try:
subprocess.run(argv)
proc = subprocess.run(argv, check=True)
convert_depfile(output, depfile)
except:
remove(output)
remove(depfile)
sys.exit(1)
sys.exit(proc.returncode)