diff options
Diffstat (limited to '')
| -rw-r--r-- | taskipy/run.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/taskipy/run.py b/taskipy/run.py index 014d0ae..ab7824d 100644 --- a/taskipy/run.py +++ b/taskipy/run.py @@ -9,7 +9,12 @@ def run_task(task_name: str, args: List[str], cwd=os.curdir): def run_commands_and_bail_on_first_fail(cmds: List[str]) -> int: for cmd in cmds: p = subprocess.Popen(cmd, shell=True, cwd=cwd) - p.wait() + + try: + p.wait() + except KeyboardInterrupt: + pass + if p.returncode != 0: return p.returncode @@ -22,7 +27,6 @@ def run_task(task_name: str, args: List[str], cwd=os.curdir): sys.exit(1) except toml.TomlDecodeError: print('pyproject.toml file is malformed and could not be read') - # should print exception details sys.exit(1) try: |