diff options
author | Boggs <hello@boggs.xyz> | 2016-07-28 02:08:11 +0800 |
---|---|---|
committer | Boggs <hello@boggs.xyz> | 2016-07-29 11:38:19 +0800 |
commit | 5b502cf02c970fb53578d1fbae0df992028db65c (patch) | |
tree | 7347639e157dc4d25037e34ed34a5f6b0203b219 | |
parent | 68901a8fedccd64580353606c89080c93d076827 (diff) | |
download | bundler-5b502cf02c970fb53578d1fbae0df992028db65c.tar.gz |
Return out of `warn_if_outdated` if installed ver satisfies running ver
-rw-r--r-- | lib/bundler/cli/install.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index 2dee4a5a77..e8a3aba2f3 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -125,6 +125,7 @@ module Bundler return if ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"].nil? installed_version = Gem::Version.new(ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"].dup) running_version = Gem::Version.new(Bundler::VERSION) + return if Gem::Requirement.new(installed_version).satisfied_by?(running_version) if Bundler.settings[:warned_version].nil? || running_version > Gem::Version.new(Bundler.settings[:warned_version]) Bundler.settings[:warned_version] = running_version Bundler.ui.warn "You're running Bundler #{installed_version} but this " \ |