diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-06-10 00:19:39 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-06-15 07:01:25 +0900 |
commit | e86f4c581b274a3e0bb198b1567cc9aa07d95343 (patch) | |
tree | 34474353b7f673c7451199999e01aac5b022c1d1 /spec/bundler/commands/update_spec.rb | |
parent | 23ecaab8dd7e7153ee34cc2cdf43df4448d66e41 (diff) |
[rubygems/rubygems] Improve frozen mode error message
This error message is also printed when using `bundler/setup` in frozen
model, so we're not necessarily installing any gems when it happens.
This new message play nicer with all situations.
https://github.com/rubygems/rubygems/commit/6874bbacce
Diffstat (limited to 'spec/bundler/commands/update_spec.rb')
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index b7a86fb99b..df69de44d2 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -658,27 +658,27 @@ RSpec.describe "bundle update" do bundle "update", :all => true, :raise_on_error => false expect(last_command).to be_failure - expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/) + expect(err).to match(/Bundler is unlocking, but the lockfile can't be updated because frozen mode is set/) expect(err).to match(/freeze by running `bundle config set frozen false`./) end it "should fail loudly when frozen is set globally" do bundle "config set --global frozen 1" bundle "update", :all => true, :raise_on_error => false - expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/). + expect(err).to match(/Bundler is unlocking, but the lockfile can't be updated because frozen mode is set/). and match(/freeze by running `bundle config set frozen false`./) end it "should fail loudly when deployment is set globally" do bundle "config set --global deployment true" bundle "update", :all => true, :raise_on_error => false - expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/). + expect(err).to match(/Bundler is unlocking, but the lockfile can't be updated because frozen mode is set/). and match(/freeze by running `bundle config set frozen false`./) end it "should not suggest any command to unfreeze bundler if frozen is set through ENV" do bundle "update", :all => true, :raise_on_error => false, :env => { "BUNDLE_FROZEN" => "true" } - expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/) + expect(err).to match(/Bundler is unlocking, but the lockfile can't be updated because frozen mode is set/) expect(err).not_to match(/by running/) end end |