Archive build script: stop when creating archive fails

The `subprocess.call()` function doesn't check the exit status code of the
subprocess. Use `subprocess.check_call()` or `subprocess.run()` instead.
This commit is contained in:
Sybren A. Stüvel 2019-11-29 10:37:43 +01:00
parent ae13bba24e
commit b25bb2d7ec
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ try:
sys.stderr.write('Unknown archive extension: ' + extension)
sys.exit(-1)
subprocess.call(archive_cmd)
subprocess.check_call(archive_cmd, env=archive_env)
except Exception as ex:
sys.stderr.write('Failed to create package archive: ' + str(ex) + '\n')
sys.exit(1)