Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/karo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ require 'karo'
begin
Karo::CLI.start(ARGV)
rescue SystemExit, Interrupt
puts "Exiting"
rescue Exception => e
puts e
STDERR.puts "Exiting"
rescue => e
STDERR.puts "karo: Error: #{e}"
STDERR.puts e.backtrace
exit 1
end
3 changes: 3 additions & 0 deletions lib/karo/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def make_command(configuration, namespace, command, extras)
def run_it(cmd, verbose=false)
say cmd, :green if verbose
system cmd unless options[:dryrun]
if $?.exitstatus != 0
raise "Non-zero exit code (#{$?.exitstatus}) returned from #{cmd.strip}"
end
end

def git_repo
Expand Down