summaryrefslogtreecommitdiff
path: root/lib/bundler/cli.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-04-22 19:52:30 +0200
committergit <svn-admin@ruby-lang.org>2024-04-25 10:35:02 +0000
commit5577f138b4422a23371a8192d9176b2f20aa6c8e (patch)
tree2983d044864d6efc3f08825c0182259a6895feae /lib/bundler/cli.rb
parent64bd8e41df859fc61f373fcab431e1516148ee57 (diff)
[rubygems/rubygems] Properly resolve aliases when `bundle help` is run
https://github.com/rubygems/rubygems/commit/5d9bf03c59
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r--lib/bundler/cli.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 8db725bbde..98d8cfe307 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -114,6 +114,8 @@ module Bundler
class_option "verbose", type: :boolean, desc: "Enable verbose output mode", aliases: "-V"
def help(cli = nil)
+ cli = self.class.all_aliases[cli] if self.class.all_aliases[cli]
+
case cli
when "gemfile" then command = "gemfile"
when nil then command = "bundle"
@@ -683,7 +685,6 @@ module Bundler
exec_used = args.index {|a| exec_commands.include? a }
command = args.find {|a| bundler_commands.include? a }
- command = all_aliases[command] if all_aliases[command]
if exec_used && help_used
if exec_used + help_used == 1