cmake: Propagate error when running command

This commit is contained in:
Xavier Claessens 2019-10-02 20:17:26 -04:00 committed by Daniel Mensinger
parent daeee32d9b
commit f73a1dff0e
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
1 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,10 @@ for i in commands:
if not i:
continue
subprocess.run(i, cwd=args.directory)
try:
subprocess.run(i, cwd=args.directory, check=True)
except subprocess.CalledProcessError:
exit(1)
if dummy_target:
with open(dummy_target, 'a'):