diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2025-08-08 11:07:04 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-08-18 12:31:51 +0900 |
| commit | f074f8260aae2cb541d13f87a990404038c1b6e5 (patch) | |
| tree | 4c4071f0e0a7b9e81e3043c0cba2f70f730a27ee | |
| parent | 2e983280e27c6e076546c0444a9489c832e9b32b (diff) | |
[rubygems/rubygems] Fix `bundle cache --no-all` not printing a deprecation warning
Like others, it's a remembered option which we are deprecating in favor
of configuration.
https://github.com/rubygems/rubygems/commit/9ea55e0df2
| -rw-r--r-- | lib/bundler/cli.rb | 1 | ||||
| -rw-r--r-- | spec/bundler/other/major_deprecation_spec.rb | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index ea85f9af22..23c20fc7b3 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -412,6 +412,7 @@ module Bundler D def cache print_remembered_flag_deprecation("--all", "cache_all", "true") if ARGV.include?("--all") + print_remembered_flag_deprecation("--no-all", "cache_all", "false") if ARGV.include?("--no-all") if flag_passed?("--path") message = diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index 51d490ea72..55a30ad157 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -199,6 +199,28 @@ RSpec.describe "major deprecations" do pending "fails with a helpful error", bundler: "4" end + context "bundle cache --no-all" do + before do + install_gemfile <<-G + source "https://gem.repo1" + gem "myrack" + G + + bundle "cache --no-all", raise_on_error: false + end + + it "should print a deprecation warning" do + expect(deprecations).to include( + "The `--no-all` flag is deprecated because it relies on being " \ + "remembered across bundler invocations, which bundler will no " \ + "longer do in future versions. Instead please use `bundle config set " \ + "cache_all false`, and stop using this flag" + ) + end + + pending "fails with a helpful error", bundler: "4" + end + context "bundle cache --path" do before do install_gemfile <<-G |
