diff options
author | Tim Fischbach <mail@timfischbach.de> | 2015-08-04 08:45:54 +0200 |
---|---|---|
committer | Tim Fischbach <mail@timfischbach.de> | 2015-08-04 09:18:09 +0200 |
commit | b37d3087b9bbf89bc6d1d4ae6d0b977c20eac053 (patch) | |
tree | 554a98b3ba0cb7a7d7c22d26d4827b4c7bf278b4 /lib/bundler/cli.rb | |
parent | 7cad928d08c75a7eeed0a4a97199a4f64b5e0ed7 (diff) | |
download | bundler-b37d3087b9bbf89bc6d1d4ae6d0b977c20eac053.tar.gz |
Add command plugin support to help command
Bundler already delegates to executables of the form
`bundler-<command>` when called as `bundle <command>` with an unknown
command. Allow viewing help entries for such command plugins by
turning calls of the form `bundle help <command>` into
`bundler-<command> --help`.
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index f4cd6c0e5f..e79cd5b145 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -66,6 +66,8 @@ module Bundler else puts File.read("#{root}/#{command}.txt") end + elsif command_path = Bundler.which("bundler-#{cli}") + Kernel.exec(command_path, "--help") else super end |