summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-07-25 18:56:53 +0200
committergit <[email protected]>2024-07-30 14:02:03 +0000
commit0dda30d9eb0a845482b1092ef4b77bf3b13fa6c5 (patch)
tree2ebcbc748ff765091374cfa679ccce397afa3b08 /lib
parent997642cfbdaa59fe900e3177d26cb35bf8f767e2 (diff)
[rubygems/rubygems] Print a better debug message when lockfile does not include the current platform
https://github.com/rubygems/rubygems/commit/afb7a6d754
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index a96fd36b6a..c7de130f24 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -137,7 +137,7 @@ module Bundler
end
@unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version)
- add_current_platform unless Bundler.frozen_bundle?
+ @current_platform_missing = add_current_platform unless Bundler.frozen_bundle?
converge_path_sources_to_gemspec_sources
@path_changes = converge_paths
@@ -484,6 +484,7 @@ module Bundler
!@source_changes &&
!@dependency_changes &&
+ !@current_platform_missing &&
@new_platforms.empty? &&
!@path_changes &&
!@local_changes &&
@@ -676,7 +677,8 @@ module Bundler
@most_specific_non_local_locked_ruby_platform = find_most_specific_locked_ruby_platform
return if @most_specific_non_local_locked_ruby_platform
- add_platform(local_platform)
+ @platforms << local_platform
+ true
end
def find_most_specific_locked_ruby_platform
@@ -704,6 +706,7 @@ module Bundler
[
[@source_changes, "the list of sources changed"],
[@dependency_changes, "the dependencies in your gemfile changed"],
+ [@current_platform_missing, "your lockfile does not include the current platform"],
[@new_platforms.any?, "you added a new platform to your gemfile"],
[@path_changes, "the gemspecs for path gems changed"],
[@local_changes, "the gemspecs for git local gems changed"],