aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/update.rb2
-rw-r--r--Library/Homebrew/test/test_updater.rb7
2 files changed, 4 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index d243799e8..6166571cd 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -196,7 +196,7 @@ class Updater
end
def `(cmd)
- out = Kernel.`(cmd) #`
+ out = super
if $? && !$?.success?
$stderr.puts out
raise ErrorDuringExecution, "Failure while executing: #{cmd}"
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index 81e60822a..410e54423 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -16,8 +16,8 @@ class UpdaterTests < Homebrew::TestCase
@outputs[cmd] << output
end
- def `(cmd, *args)
- cmd = "#{cmd} #{args*' '}".strip
+ def `(*args)
+ cmd = args.join(" ")
if @expected.include?(cmd) and !@outputs[cmd].empty?
@called << cmd
@outputs[cmd].shift
@@ -25,8 +25,7 @@ class UpdaterTests < Homebrew::TestCase
raise "#{inspect} unexpectedly called backticks: `#{cmd}`"
end
end
-
- alias safe_system ` #`
+ alias_method :safe_system, :`
def expectations_met?
@expected == @called