Files
git-utilities/lib/shared/runnable.rb
2015-06-06 07:05:30 -04:00

24 lines
373 B
Ruby

module Shared
module Runnable
def run_cmd ( cmd, fallback_branch = current_branch )
puts
puts cmd
success = system cmd
unless success
system "git checkout #{fallback_branch}"
error "(see above)"
end
puts
end
def error ( msg )
puts
puts "ERROR: #{msg}"
puts
exit
end
end
end