diff options
author | Garoe <neochuki@gmail.com> | 2013-08-31 12:17:32 +0100 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-08-31 19:02:17 -0700 |
commit | c3b003ccf26ef29ed2acd09e5106ac0a4bf79456 (patch) | |
tree | 0651840f6cd9b6555962726211423579f0096564 | |
parent | 4f76c00e52df48b17af20b34978241c9f8124036 (diff) | |
download | bundler-platforms.tar.gz |
Flag platform is no longer reseted between calls.platforms
Added message to inform the user about installing gems
for a platform that is not the local one.
-rw-r--r-- | lib/bundler/cli.rb | 9 | ||||
-rw-r--r-- | lib/bundler/installer.rb | 5 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index e5750610d1..ae83d30fa4 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -229,16 +229,11 @@ module Bundler end if opts[:platform] - if Dependency.gem_platform(opts[:platform].to_sym) - Bundler.settings[:platform] = opts[:platform] - else + Bundler.settings[:platform] = opts[:platform] + unless Dependency.gem_platform(opts[:platform].to_sym) raise InvalidOption, "Unknown platform, available platforms are " \ "#{(Dependency::PLATFORM_MAP.keys.collect {|p| p.to_s}).inspect}" end - else - #Reset settings[:platform] to nil because if the option was given - #in a previous call it was stored - Bundler.settings[:platform] = nil end # When install is called with --no-deployment, disable deployment mode diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 8b642e6998..3c2c0716f6 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -66,6 +66,11 @@ module Bundler return end + if Bundler.settings[:platform] + Bundler.ui.warn "Gems will be installed for platform #{Bundler.settings[:platform]}" \ + " instead of current platform #{Gem::Platform::local}" + end + if Bundler.default_lockfile.exist? && !options["update"] local = Bundler.ui.silence do begin |