diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-09-18 20:12:01 -0300 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-09-18 21:40:54 -0300 |
commit | 18ae708c3c3736a17879ce365368e6db7a5576ab (patch) | |
tree | b6fbdafeaf79798082a27c651d5f848dcec40db9 /lib/bundler/cli.rb | |
parent | 90109e4efd2ba96967a2f2a8326c6f82d4e67297 (diff) | |
download | bundler-18ae708c3c3736a17879ce365368e6db7a5576ab.tar.gz |
Deprecate `bundle install --force`
Instead of hard erroring, deprecate the `--force` flag on bundler 2 to
better teach users about the replacement.
Before:
$ bundle install --force
Unknown switches '--force'
After:
$ bundle install --force
[DEPRECATED FOR 2.0] The `--force` option has been renamed to `--redownload`
Could not locate Gemfile # or whatever the expected behavior for --redownload is
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index f692ae5f13..73f4e1bf9d 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -206,8 +206,7 @@ module Bundler "Do not attempt to fetch gems remotely and use the gem cache instead" deprecated_option "no-cache", :type => :boolean, :banner => "Don't update the existing gem cache." - method_option "redownload", :type => :boolean, :aliases => - [Bundler.feature_flag.forget_cli_options? ? nil : "--force"].compact, :banner => + method_option "redownload", :type => :boolean, :aliases => "--force", :banner => "Force downloading every gem." deprecated_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache." @@ -230,6 +229,7 @@ module Bundler "Include gems that are part of the specified named group." map "i" => "install" def install + SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV[1] == "--force" require "bundler/cli/install" Bundler.settings.temporary(:no_install => false) do Install.new(options.dup).run |