From 56dd575f9603a75015fbdd4a7d7daea0c34a2cb9 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 18 Sep 2014 20:32:50 -0500 Subject: Pass command and arg list into ErrorDuringExecution constructor --- Library/Homebrew/utils.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 293fe0d06..fa2f430e3 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -127,10 +127,7 @@ end # Kernel.system but with exceptions def safe_system cmd, *args - unless Homebrew.system cmd, *args - args = args.map{ |arg| arg.to_s.gsub " ", "\\ " } * " " - raise ErrorDuringExecution, "Failure while executing: #{cmd} #{args}" - end + Homebrew.system(cmd, *args) or raise ErrorDuringExecution.new(cmd, args) end # prints no output -- cgit v1.2.3