diff options
author | Bruno P. Kinoshita <brunodepaulak@yahoo.com.br> | 2017-05-29 18:52:03 +1200 |
---|---|---|
committer | Bruno P. Kinoshita <brunodepaulak@yahoo.com.br> | 2017-05-29 19:00:43 +1200 |
commit | 058ec527a3ce722031cdb301dba6950cab85e859 (patch) | |
tree | cc9e751906ca70430fcacc56b26825781b1cadd0 /lib/dashing | |
parent | fce2ae11158aa39d1a3a5572707a997384afc6fc (diff) |
Capture Interrupt error (Ctrl+c) and cleanly exit
Diffstat (limited to 'lib/dashing')
-rw-r--r-- | lib/dashing/cli.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dashing/cli.rb b/lib/dashing/cli.rb index 4b93f89..57d48d0 100644 --- a/lib/dashing/cli.rb +++ b/lib/dashing/cli.rb @@ -86,7 +86,11 @@ module Dashing private def run_command(command) - system(command) + begin + system(command) + rescue Interrupt => e + say "Exiting..." + end end def install_widget_from_gist(gist, skip_overwrite) |