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
1 file
+ 1
4
Compare changes
  • Side-by-side
  • Inline
@@ -246,7 +246,6 @@ def create_dir_structure(mpsd_release: str, script_dir: Path) -> None:
run(["git", "pull"], check=True)
def get_release_info(mpsd_release: str, script_dir: Path) -> Tuple[str, str, List[str]]:
"""
Get information about the specified release, such as the branch and commit hash
@@ -276,9 +275,7 @@ def get_release_info(mpsd_release: str, script_dir: Path) -> Tuple[str, str, Lis
with os_chdir("spack-environments"):
# Get the branch and commit hash of the spack-environments repo
spe_commit_hash = (
run(
["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, check=True
)
run(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, check=True)
.stdout.decode()
.strip()
)
Loading