diff options
author | Boggs <hello.boggs@gmail.com> | 2016-04-30 04:10:58 +0800 |
---|---|---|
committer | Boggs <hello.boggs@gmail.com> | 2016-04-30 04:13:03 +0800 |
commit | 60e571218d16dca4b17e4bd9c297bbc8ec339f6d (patch) | |
tree | e916fd259b2c2113a00b7adb673b696d759466c8 | |
parent | 87296125abbcf48f6719cf3e48f591b9274b0d47 (diff) | |
download | bundler-60e571218d16dca4b17e4bd9c297bbc8ec339f6d.tar.gz |
Use help switch specified in args instead of replacing it with --help
-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 b99e2c7c7c..feac4dc6f7 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -437,7 +437,7 @@ module Bundler # into the corresponding `bundle help #{command}` call def self.reformatted_help_args(args) bundler_commands = all_commands.keys - help_flags = %w(--help -h) + help_flags = args.select {|a| %w(--help -h).include? a } command = args.select {|a| bundler_commands.include? a } other_flags = args.select {|a| a.include? "--" } - help_flags executables = args - command - help_flags - other_flags @@ -447,7 +447,7 @@ module Bundler elsif executables.any? new_args << command.first new_args += executables - new_args << "--help" + new_args += help_flags new_args += other_flags else new_args += ["help", command.first] |