Permalink
Browse files

output the command GemHelper is running in verbose/debug

  • Loading branch information...
1 parent 7c852a9 commit f02fac9883ff4af3b3584b0190d20f310b26cd32 @indirect indirect committed Nov 13, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/bundler/gem_helper.rb
@@ -12,7 +12,7 @@ def self.install_tasks(opts = nil)
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 @@ def sh(cmd, &block)
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

0 comments on commit f02fac9

Please sign in to comment.