Skip to content

Commit

Permalink
TOOLS/docutils-wrapper: handle commands without depfile
Browse files Browse the repository at this point in the history
  • Loading branch information
t-8ch authored and Dudemanguy committed Mar 24, 2023
1 parent 375e527 commit 7075543
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions TOOLS/docutils-wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ def remove(path):

try:
proc = subprocess.run(argv, check=True)
convert_depfile(output, depfile)
if depfile is not None:
convert_depfile(output, depfile)
except:
remove(output)
remove(depfile)
if depfile is not None:
remove(depfile)
sys.exit(1)

sys.exit(proc.returncode)

0 comments on commit 7075543

Please sign in to comment.