]> err.no Git - pwstore/commitdiff
Nicer error messages when used interactively master
authorTollef Fog Heen <tfheen@err.no>
Mon, 10 Mar 2014 09:24:26 +0000 (10:24 +0100)
committerTollef Fog Heen <tfheen@err.no>
Mon, 10 Mar 2014 09:24:26 +0000 (10:24 +0100)
pws.rb

diff --git a/pws.rb b/pws.rb
index d90c94003fa22e91fafe9aae5c8c31a81e0a87e9..14424f13fd5a9b1a91db32737dd2d30802daa77d 100755 (executable)
--- a/pws.rb
+++ b/pws.rb
@@ -1014,7 +1014,12 @@ def parse_command
 end
 
 if __FILE__ == $0
 end
 
 if __FILE__ == $0
-  parse_command
+  begin
+    parse_command
+  rescue RuntimeError => e
+    STDERR.puts e.message
+    exit(1)
+  end
 end
 
 # vim:set shiftwidth=2:
 end
 
 # vim:set shiftwidth=2: