summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-08-19 14:03:43 +0200
committergit <svn-admin@ruby-lang.org>2022-08-21 17:54:11 +0900
commit560941e711bed8e8cdd0183b76d9e2057cce6806 (patch)
tree212894e36eeba163f779a32e524ad68a2f9b2189 /spec/bundler
parentb87ddd7538220e9782274281356fd55bfd29078b (diff)
[rubygems/rubygems] Fix edge case where `bundler/inline` unintentionally skips install
If the application has the `no_install` setting set for `bundle package`, then `bundler/inline` would silently skip installing any gems. https://github.com/rubygems/rubygems/commit/7864f49b27
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/runtime/inline_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/bundler/runtime/inline_spec.rb b/spec/bundler/runtime/inline_spec.rb
index dd22c86f90..e3cf5020ec 100644
--- a/spec/bundler/runtime/inline_spec.rb
+++ b/spec/bundler/runtime/inline_spec.rb
@@ -355,6 +355,20 @@ RSpec.describe "bundler/inline#gemfile" do
expect(err).to be_empty
end
+ it "still installs if the application has `bundle package` no_install config set" do
+ bundle "config set --local no_install true"
+
+ script <<-RUBY
+ gemfile do
+ source "#{file_uri_for(gem_repo1)}"
+ gem "rack"
+ end
+ RUBY
+
+ expect(last_command).to be_success
+ expect(system_gem_path("gems/rack-1.0.0")).to exist
+ end
+
it "preserves previous BUNDLE_GEMFILE value" do
ENV["BUNDLE_GEMFILE"] = ""
script <<-RUBY