Skip to content
Snippets Groups Projects

force `subprocess.run` to check return code is 0

Merged Hans Fangohr requested to merge force-checking-of-error-code into linux-debian11
All threads resolved!
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -193,6 +193,7 @@ def setup_log_cmd(
run(
["git", "rev-parse", "--abbrev-ref", "HEAD"],
stdout=subprocess.PIPE,
check=True,
)
.stdout.decode()
.strip()
@@ -201,6 +202,7 @@ def setup_log_cmd(
run(
["git", "rev-parse", "--short", "HEAD"],
stdout=subprocess.PIPE,
check=True,
)
.stdout.decode()
.strip()
@@ -250,7 +252,8 @@ def create_dir_structure(mpsd_release: str, script_dir: Path) -> None:
"git",
"clone",
config_vars["spack_environments_repo"],
]
],
check=True,
)
with os_chdir("spack-environments"):
# Git fetch and checkout the release branch and git pull
@@ -460,6 +463,7 @@ def install_environment(
f"bash {spack_setup_script} {' '.join(install_flags)} {toolchain} 2>&1 "
f"| tee -a {install_log_file} ",
shell=True,
check=True,
)
Loading