Skip to content

Commit

Permalink
Less noise when command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshanuikabundi committed Jan 26, 2023
1 parent f5ddc4e commit 8833f51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion soap/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Callable, Optional
import os
import shlex
from subprocess import CalledProcessError

import typer
from typer import Argument, Option, Typer, echo
Expand Down Expand Up @@ -116,7 +117,10 @@ def run(
cfg = soap.Config()
this_env = cfg.envs[env]
soap.prepare_env(this_env)
soap.run_in_env(shlex.split(args), this_env)
try:
soap.run_in_env(shlex.split(args), this_env)
except CalledProcessError as e:
exit(e.returncode)


_click = typer.main.get_command(app)
Expand Down

0 comments on commit 8833f51

Please sign in to comment.