Commit 70ba6a83 authored by Xavier Thompson's avatar Xavier Thompson

[feat] Raise an exception when pip fails

Before this, sys.exit(1) was called to terminate the program directly.
parent 09adb8a7
......@@ -1797,15 +1797,7 @@ def call_pip_install(spec, dest, options):
sys.stdout.flush() # We want any pending output first
exit_code = subprocess.call(list(args), env=env)
if exit_code:
logger.error(
"An error occurred when trying to install %s. "
"Look above this message for any errors that "
"were output by pip install.",
spec)
sys.exit(1)
subprocess.check_call(list(args), env=env)
split_entries = [os.path.splitext(entry) for entry in os.listdir(dest)]
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment