mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
3af9d8bb67
commit
ff908983be
2 changed files with 6 additions and 2 deletions
|
@ -892,7 +892,7 @@ module Bundler
|
||||||
next if !remote && !dep.current_platform?
|
next if !remote && !dep.current_platform?
|
||||||
platforms = dep.gem_platforms(sorted_platforms)
|
platforms = dep.gem_platforms(sorted_platforms)
|
||||||
if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
|
if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
|
||||||
mapped_platforms = dep.platforms.map {|p| Dependency::PLATFORM_MAP[p] }
|
mapped_platforms = dep.expanded_platforms
|
||||||
Bundler.ui.warn \
|
Bundler.ui.warn \
|
||||||
"The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
|
"The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
|
||||||
"Bundler is installing for #{@platforms.join ", "} but the dependency " \
|
"Bundler is installing for #{@platforms.join ", "} but the dependency " \
|
||||||
|
|
|
@ -105,11 +105,15 @@ module Bundler
|
||||||
def gem_platforms(valid_platforms)
|
def gem_platforms(valid_platforms)
|
||||||
return valid_platforms if @platforms.empty?
|
return valid_platforms if @platforms.empty?
|
||||||
|
|
||||||
@gem_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.uniq
|
@gem_platforms ||= expanded_platforms.compact.uniq
|
||||||
|
|
||||||
valid_platforms & @gem_platforms
|
valid_platforms & @gem_platforms
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def expanded_platforms
|
||||||
|
@platforms.map {|pl| PLATFORM_MAP[pl] }
|
||||||
|
end
|
||||||
|
|
||||||
def should_include?
|
def should_include?
|
||||||
@should_include && current_env? && current_platform?
|
@should_include && current_env? && current_platform?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue