diff options
-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 |