summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-12 22:03:06 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-24 11:25:36 +0200
commit2c75b6d63efb93dfd448058bd16170cc21284dea (patch)
treeb82e8744ed69ebd1f309d55202c5f20b6f0d941f
parent5c26795f26b72e1a2faddd12448b19602aae8399 (diff)
downloadbundler-skip_platform_warnings_during_bundle_inline.tar.gz
Skip platform warnings in inline modeskip_platform_warnings_during_bundle_inline
Since there's no lock file, I don't think they make sense.
-rw-r--r--lib/bundler/inline.rb2
-rw-r--r--spec/runtime/inline_spec.rb13
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb
index fed31ba4e3..317bf892ab 100644
--- a/lib/bundler/inline.rb
+++ b/lib/bundler/inline.rb
@@ -60,7 +60,7 @@ def gemfile(install = false, options = {}, &gemfile)
Bundler.ui = ui if install
if install || missing_specs.call
- Bundler.settings.temporary(:inline => true) do
+ Bundler.settings.temporary(:inline => true, :disable_platform_warnings => true) do
installer = Bundler::Installer.install(Bundler.root, definition, :system => true)
installer.post_install_messages.each do |name, message|
Bundler.ui.info "Post-install message from #{name}:\n#{message}"
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index d837425414..d53c3d1c15 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -290,4 +290,17 @@ RSpec.describe "bundler/inline#gemfile" do
expect(last_command).to be_success
expect(out).to eq "1.0.0"
end
+
+ it "skips platform warnings" do
+ simulate_platform "ruby"
+
+ script <<-RUBY
+ gemfile(true) do
+ source "file://#{gem_repo1}"
+ gem "rack", platform: :jruby
+ end
+ RUBY
+
+ expect(err).to be_empty
+ end
end