diff --git a/TOOLS/docutils-wrapper.py b/TOOLS/docutils-wrapper.py index ff2757a1d8..4e31c37417 100755 --- a/TOOLS/docutils-wrapper.py +++ b/TOOLS/docutils-wrapper.py @@ -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)