Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Fix deprecations bug
Browse files Browse the repository at this point in the history
Deprecations enabled or not, we only want to print deprecations for the
running major version, never for future versions.
  • Loading branch information
deivid-rodriguez committed Feb 21, 2019
1 parent 76c411d commit 82d4176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/shared_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def major_deprecation(major_version, message)
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}")
Expand Down

0 comments on commit 82d4176

Please sign in to comment.