lib/devinstall/utils.rb in devinstall-0.2.6 vs lib/devinstall/utils.rb in devinstall-1.0.0
- old
+ new
@@ -6,18 +6,24 @@
unless $dry
ret = `#{cmd}` unless $dry
if $?.exitstatus != 0 ## return failure
puts "While executing:"
puts cmd
- puts "The command failed with exitstatus $?.exitstatus"
+ puts "The command failed with exitstatus #{$?.exitstatus}"
puts "Full output of command follows"
puts "="*40
puts ret
+ puts "="*40
puts "Nothing to do. Aborting!"
- exit! 1
+ exit! "Done"
end
end
ret
+ end
+
+ def exit! msg
+ puts msg || "Aborting!"
+ Kernel.exit 1
end
end #module