summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-11-12 23:16:56 -0600
committerAndre Arko <andre@arko.net>2010-11-13 01:14:43 -0600
commitf02fac9883ff4af3b3584b0190d20f310b26cd32 (patch)
tree3263d2a6662114fe34b7bac99e5a174cc3b47704
parent7c852a9d0c84d5dd99c44e5d9a5ce2baabce1471 (diff)
downloadbundler-f02fac9883ff4af3b3584b0190d20f310b26cd32.tar.gz
output the command GemHelper is running in verbose/debug
-rw-r--r--lib/bundler/gem_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 21740d4146..ff5d5421c8 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -12,7 +12,7 @@ module Bundler
attr_reader :spec_path, :base, :gemspec
def initialize(base, name = nil)
- Bundler.ui = UI::Shell.new(Thor::Base.shell)
+ Bundler.ui = UI::Shell.new(Thor::Base.shell.new)
@base = base
gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "*.gemspec")]
raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
@@ -132,9 +132,11 @@ module Bundler
end
def sh_with_code(cmd, &block)
+ cmd << " 2>&1"
outbuf = ''
+ Bundler.ui.debug(cmd)
Dir.chdir(base) {
- outbuf = `#{cmd} 2>&1`
+ outbuf = `#{cmd}`
if $? == 0
block.call(outbuf) if block
end