From 058ec527a3ce722031cdb301dba6950cab85e859 Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Mon, 29 May 2017 18:52:03 +1200 Subject: Capture Interrupt error (Ctrl+c) and cleanly exit --- lib/dashing/cli.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3