lib/bundler/definition.rb in bundler-1.14.3 vs lib/bundler/definition.rb in bundler-1.14.4
- old
+ new
@@ -823,14 +823,16 @@
dependencies.each do |dep|
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
next if !remote && !dep.current_platform?
platforms = dep.gem_platforms(@platforms)
if platforms.empty?
+ mapped_platforms = dep.platforms.map {|p| Dependency::PLATFORM_MAP[p] }
Bundler.ui.warn \
"The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
"Bundler is installing for #{@platforms.join ", "} but the dependency " \
- "is only for #{dep.platforms.map {|p| Dependency::PLATFORM_MAP[p] }.join ", "}. " \
- "To add those platforms to the bundle, run `bundle lock --add-platform #{dep.platforms.join ", "}`."
+ "is only for #{mapped_platforms.join ", "}. " \
+ "To add those platforms to the bundle, " \
+ "run `bundle lock --add-platform #{mapped_platforms.join " "}`."
end
platforms.each do |p|
deps << DepProxy.new(dep, p) if remote || p == generic_local_platform
end
end