Skip to content

Commit

Permalink
Check forked process calls for success during app installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
csadorf committed Jul 27, 2022
1 parent faf8e78 commit e706266
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aiidalab/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ def this_or_only_subdir(path):


def run_pip_install(*args, python_bin=sys.executable):
return subprocess.Popen(
return subprocess.check_call(
[python_bin, "-m", "pip", "install", *args],
text=True,
bufsize=1,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
Expand All @@ -217,16 +218,17 @@ def run_reentry_scan():


def run_verdi_daemon_restart():
return subprocess.Popen(
return subprocess.check_call(
["verdi", "daemon", "restart"],
text=True,
bufsize=1,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)


def run_post_install_script(post_install_script_path):
return subprocess.Popen(
return subprocess.check_call(
f"./{post_install_script_path.resolve().stem}",
cwd=post_install_script_path.resolve().parent,
stdout=subprocess.DEVNULL,
Expand Down

0 comments on commit e706266

Please sign in to comment.