summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-21 10:51:51 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-02-21 16:32:24 +0100
commit82d41768b73db8b4a994bc465a12fe2440efa434 (patch)
tree08a8644ecb0c798fa341ed4a222a312cc71881f3
parent76c411d455cbca8cf6cd3dddf1488dd0310f0bd8 (diff)
downloadbundler-82d41768b73db8b4a994bc465a12fe2440efa434.tar.gz
Fix deprecations bug
Deprecations enabled or not, we only want to print deprecations for the running major version, never for future versions.
-rw-r--r--lib/bundler/shared_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index e0cb61e03f..ba2808e034 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -147,7 +147,7 @@ module Bundler
raise DeprecatedError, "[REMOVED] #{message}"
end
- return unless bundler_major_version >= major_version || prints_major_deprecations?
+ return unless bundler_major_version >= major_version && prints_major_deprecations?
@major_deprecation_ui ||= Bundler::UI::Shell.new("no-color" => true)
ui = Bundler.ui.is_a?(@major_deprecation_ui.class) ? Bundler.ui : @major_deprecation_ui
ui.warn("[DEPRECATED] #{message}")