lib/imw/utils/extensions.rb in imw-0.2.2 vs lib/imw/utils/extensions.rb in imw-0.2.3
- old
+ new
@@ -56,11 +56,12 @@
#
# which will work fine since +flags+ will automatically be flattend.
def self.system *commands
stripped_commands = commands.flatten.map { |command| command.to_s unless command.blank? }.compact
IMW.announce_if_verbose(stripped_commands.join(" "))
- Kernel.system(*stripped_commands)
+ exit_code = Kernel.system(*stripped_commands)
raise IMW::SystemCallError.new($?.dup, commands.join(' ')) unless $?.success?
+ exit_code
end
end