diff options
Diffstat (limited to 'lib/bundler/cli/config.rb')
-rw-r--r-- | lib/bundler/cli/config.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb index f412e80829..1df2a55d9a 100644 --- a/lib/bundler/cli/config.rb +++ b/lib/bundler/cli/config.rb @@ -14,8 +14,20 @@ module Bundler scope_options method_option :delete, :type => :boolean, :banner => "delete" def base(name = nil, *value) + new_args = + if ARGV.size == 1 + ["config", "list"] + elsif ARGV.include?("--delete") + ARGV.map {|arg| arg == "--delete" ? "unset" : arg } + elsif ARGV.include?("--global") || ARGV.include?("--local") || ARGV.size == 3 + ["config", "set", *ARGV[1..-1]] + else + ["config", "get", ARGV[1]] + end + SharedHelpers.major_deprecation 2, - "Using the `config` command without a subcommand [list, get, set, unset]" + "Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead." + Base.new(options, name, value, self).run end |