diff options
| author | Jack Nagel | 2014-06-23 18:50:55 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-23 18:50:55 -0500 |
| commit | 3dbcba0c03225f2069e8d0681fbdecba9469d345 (patch) | |
| tree | 3dd3dc56c0858743b1545d41b795a896c2c41f35 /Library | |
| parent | 43cb0b91417d941922993e25f8fa70f5ca31745b (diff) | |
| download | brew-3dbcba0c03225f2069e8d0681fbdecba9469d345.tar.bz2 | |
Call original backtick using super
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_updater.rb | 7 |
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 |
