aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-09-08 16:06:39 +0800
committerXu Cheng2015-09-08 17:36:28 +0800
commite3299bb7a39c2eb5505496c4dca05092ca378cc1 (patch)
tree9a030a7b6d973551a2cfc8bae05a845c13277ddf
parent67c3f8ff2705a92a2505e46de42ab16f6a70e42b (diff)
downloadbrew-e3299bb7a39c2eb5505496c4dca05092ca378cc1.tar.bz2
quiet_system: don't print cmd even when verbose mode
It's kinda annoying that quiet_system wasn't really quiet. This commit fixes that.
-rw-r--r--Library/Homebrew/utils.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 1fa081419..2b496565c 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -133,8 +133,7 @@ def interactive_shell(f = nil)
end
module Homebrew
- def self.system(cmd, *args)
- puts "#{cmd} #{args*" "}" if ARGV.verbose?
+ def self._system(cmd, *args)
pid = fork do
yield if block_given?
args.collect!(&:to_s)
@@ -145,6 +144,11 @@ module Homebrew
$?.success?
end
+ def self.system(cmd, *args)
+ puts "#{cmd} #{args*" "}" if ARGV.verbose?
+ _system(cmd, *args)
+ end
+
def self.git_head
HOMEBREW_REPOSITORY.cd { `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle }
end
@@ -213,7 +217,7 @@ end
# prints no output
def quiet_system(cmd, *args)
- Homebrew.system(cmd, *args) do
+ Homebrew._system(cmd, *args) do
# Redirect output streams to `/dev/null` instead of closing as some programs
# will fail to execute if they can't write to an open stream.
$stdout.reopen("/dev/null")