summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2012-12-08 11:27:10 -0800
committerAndre Arko <andre@arko.net>2012-12-08 11:27:10 -0800
commitb7308a8e74f27b6f4a023163d99454bf9de4621e (patch)
tree18c1c3fa2b054e456a0da51fd791efaae283c5ab
parent45263ba367d8a7631479fecf95f598b6847e6e9b (diff)
parentfc5f4f17565fb8da2a01e9d2b2d8146e44915d9d (diff)
downloadbundler-b7308a8e74f27b6f4a023163d99454bf9de4621e.tar.gz
Merge pull request #2194 from rohit/quiet_git
Quiet git during bundle install if quiet option set
-rw-r--r--lib/bundler/source/git/git_proxy.rb6
-rw-r--r--lib/bundler/ui.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 385e4ed1d0..c64953edcd 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -44,7 +44,9 @@ module Bundler
else
Bundler.ui.info "Fetching #{uri}"
FileUtils.mkdir_p(path.dirname)
- git %|clone #{uri_escaped} "#{path}" --bare --no-hardlinks|
+ clone_command = %|clone #{uri_escaped} "#{path}" --bare --no-hardlinks|
+ clone_command = "#{clone_command} --quiet" if Bundler.ui.quiet?
+ git clone_command
end
end
@@ -139,4 +141,4 @@ module Bundler
end
end
-end \ No newline at end of file
+end
diff --git a/lib/bundler/ui.rb b/lib/bundler/ui.rb
index d0e8aae49c..55f5682750 100644
--- a/lib/bundler/ui.rb
+++ b/lib/bundler/ui.rb
@@ -57,6 +57,10 @@ module Bundler
@quiet = true
end
+ def quiet?
+ @quiet
+ end
+
def debug?
# needs to be false instead of nil to be newline param to other methods
!!@debug && !@quiet