summaryrefslogtreecommitdiff
path: root/lib/bundler/vendor/thor/lib/thor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor.rb')
-rw-r--r--lib/bundler/vendor/thor/lib/thor.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor.rb b/lib/bundler/vendor/thor/lib/thor.rb
index 395fad28eb..f2a03388cc 100644
--- a/lib/bundler/vendor/thor/lib/thor.rb
+++ b/lib/bundler/vendor/thor/lib/thor.rb
@@ -175,7 +175,7 @@ class Bundler::Thor
handle_no_command_error(meth) unless command
shell.say "Usage:"
- shell.say " #{banner(command)}"
+ shell.say " #{banner(command).split("\n").join("\n ")}"
shell.say
class_options_help(shell, nil => command.options.values)
if command.long_description
@@ -398,7 +398,10 @@ class Bundler::Thor
# the namespace should be displayed as arguments.
#
def banner(command, namespace = nil, subcommand = false)
- "#{basename} #{command.formatted_usage(self, $thor_runner, subcommand)}"
+ $thor_runner ||= false
+ command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage|
+ "#{basename} #{formatted_usage}"
+ end.join("\n")
end
def baseclass #:nodoc: