summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno P. Kinoshita <kinow@users.noreply.github.com>2017-06-13 16:00:53 +1200
committerGitHub <noreply@github.com>2017-06-13 16:00:53 +1200
commit1ea92c857003a3fca707bf3523a930639aa8a197 (patch)
treecc9e751906ca70430fcacc56b26825781b1cadd0
parentfce2ae11158aa39d1a3a5572707a997384afc6fc (diff)
parent058ec527a3ce722031cdb301dba6950cab85e859 (diff)
Merge pull request #67 from kinow/exit-cleanly
Capture Interrupt error (Ctrl+c) and cleanly exit
-rw-r--r--lib/dashing/cli.rb6
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)