Skip to content

Commit

Permalink
Print stderr if run fails
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jul 13, 2024
1 parent 7aab965 commit fe2c709
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/cibuildpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ def prepend_env(env, name, new, separator=" "):

def run(cmd, env=None):
log_print(f"- Running: {cmd}")
subprocess.run(cmd, check=True, env=env)
try:
subprocess.run(cmd, check=True, env=env, stderr=subprocess.PIPE, text=True)
except subprocess.CalledProcessError as e:
print(f"stderr: {e.stderr}")
raise e


@dataclass
Expand Down

0 comments on commit fe2c709

Please sign in to comment.