diff options
author | Andre Arko <andre@arko.net> | 2015-06-07 23:01:17 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-06-07 23:01:17 -0700 |
commit | de5c595bee595b1c5a77c684b7f89f7c521fae5c (patch) | |
tree | 334172d7187f933a277ec257d2e3bbe8ecc606cc | |
parent | 849c649632b71111a06e71c0170ba966aca60d04 (diff) | |
download | bundler-de5c595bee595b1c5a77c684b7f89f7c521fae5c.tar.gz |
print installing message _before_ installing
fixes failing spec from 2a73e2d
-rw-r--r-- | lib/bundler/installer.rb | 12 | ||||
-rw-r--r-- | lib/bundler/source/rubygems.rb | 10 |
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index d0a7dc4fda..67961a01ac 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -107,20 +107,12 @@ module Bundler if settings # Build arguments are global, so this is mutexed Bundler.rubygems.with_build_args [settings] do - messages = spec.source.install(spec, install_options) + post_install_message = spec.source.install(spec, install_options) end else - messages = spec.source.install(spec, install_options) + post_install_message = spec.source.install(spec, install_options) end - install_message, post_install_message, debug_message = *messages - - if install_message.include? 'Installing' - Bundler.ui.confirm install_message - else - Bundler.ui.info install_message - end - Bundler.ui.debug debug_message if debug_message Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}" if Bundler.settings[:bin] && standalone diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 797988f365..d98514faed 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -98,8 +98,9 @@ module Bundler end end - return ["Using #{version_message(spec)}", nil] if installed_specs[spec].any? && !force - + if installed_specs[spec].any? && !force + return Bundler.ui.info "Using #{version_message(spec)}" + end # Download the gem to get the spec, because some specs that are returned # by rubygems.org are broken and wrong. @@ -115,6 +116,8 @@ module Bundler end unless Bundler.settings[:no_install] + Bundler.ui.confirm "Installing #{version_message(spec)} " + path = cached_gem(spec) if Bundler.requires_sudo? install_path = Bundler.tmp(spec.full_name) @@ -158,7 +161,8 @@ module Bundler installed_spec.loaded_from = loaded_from(spec) end spec.loaded_from = loaded_from(spec) - ["Installing #{version_message(spec)}", spec.post_install_message] + + spec.post_install_message ensure Bundler.rm_rf(install_path) if Bundler.requires_sudo? end |