Skip to content

Commit

Permalink
Deprecate bundle package --all flag
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Aug 28, 2020
1 parent eb0ac7a commit 127fa58
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bundler/lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ def outdated(*gems)
bundle without having to download any additional gems.
D
def cache
SharedHelpers.major_deprecation 2,
"The `--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 true`, " \
"and stop using this flag" if ARGV.include?("--all")

require_relative "cli/cache"
Cache.new(options).run
end
Expand Down
22 changes: 22 additions & 0 deletions bundler/spec/other/major_deprecation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,28 @@
pending "should fail with a helpful error", :bundler => "3"
end

context "bundle cache --all" do
before do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G

bundle "cache --all", :raise_on_error => false
end

it "should print a deprecation warning", :bundler => "2" do
expect(deprecations).to include(
"The `--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 true`, and stop using this flag"
)
end

pending "should fail with a helpful error", :bundler => "3"
end

describe "bundle config" do
describe "old list interface" do
before do
Expand Down

0 comments on commit 127fa58

Please sign in to comment.