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

Commit

Permalink
Add config variable and check for platform warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
agrim123 committed Feb 25, 2018
1 parent 86e4b2a commit 6d563b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def expand_dependencies(dependencies, remote = false)
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
next if !remote && !dep.current_platform?
platforms = dep.gem_platforms(sorted_platforms)
if platforms.empty?
if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
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. " \
Expand Down
1 change: 1 addition & 0 deletions lib/bundler/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Settings
disable_exec_load
disable_local_branch_check
disable_multisource
disable_platform_warnings
disable_shared_gems
disable_version_check
error_on_stderr
Expand Down

0 comments on commit 6d563b0

Please sign in to comment.