gkmngrgn / dosh-core

Shell-independent task manager.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle `KeyboardInterrupt` when a task interrupted with `ctrl-c` / `ctrl-z`

gkmngrgn opened this issue · comments

$ DOSH_ENV="dev" dosh dev
DOSH => [RUN] hugo server -D --bind 0.0.0.0 -b mydomain
^CTraceback (most recent call last):
  File "app.py", line 12, in <module>
  File "app.py", line 8, in main
  File "dosh/cli.py", line 92, in run
  File "dosh/config.py", line 70, in run_task
  File "lupa/_lupa.pyx", line 587, in lupa._lupa._LuaObject.__call__
  File "lupa/_lupa.pyx", line 1333, in lupa._lupa.call_lua
  File "lupa/_lupa.pyx", line 1358, in lupa._lupa.execute_lua_call
  File "lupa/_lupa.pyx", line 281, in lupa._lupa.LuaRuntime.reraise_on_exception
  File "lupa/_lupa.pyx", line 1496, in lupa._lupa.py_call_with_gil
  File "lupa/_lupa.pyx", line 1483, in lupa._lupa.call_python
  File "dosh/commands/external.py", line 112, in run
KeyboardInterrupt
[64905] Failed to execute script 'app' due to unhandled exception!