summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--lib/bundler/settings.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 0349af39f2..6b42fe0fb5 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -878,7 +878,7 @@ module Bundler
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. " \
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 75e2d4dff2..83c119a562 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -26,6 +26,7 @@ module Bundler
disable_exec_load
disable_local_branch_check
disable_multisource
+ disable_platform_warnings
disable_shared_gems
disable_version_check
error_on_stderr