diff options
Diffstat (limited to 'Library/Homebrew/cmd/gist-logs.rb')
| -rw-r--r-- | Library/Homebrew/cmd/gist-logs.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb index f51e20ed3..543bd6289 100644 --- a/Library/Homebrew/cmd/gist-logs.rb +++ b/Library/Homebrew/cmd/gist-logs.rb @@ -1,3 +1,14 @@ +#: * `gist-logs` [`--new-issue`|`-n`] <formula>: +#: Upload logs for a failed build of <formula> to a new Gist. +#: +#: <formula> is usually the name of the formula to install, but it can be specified +#: in several different ways. See [SPECIFYING FORMULAE][]. +#: +#: If `--new-issue` is passed, automatically create a new issue in the appropriate +#: GitHub repository as well as creating the Gist. +#: +#: If no logs are found, an error message is presented. + require "formula" require "system_config" require "net/http" @@ -161,11 +172,7 @@ module Homebrew end def gist_logs - if ARGV.resolved_formulae.length != 1 - puts "usage: brew gist-logs [--new-issue|-n] <formula>" - Homebrew.failed = true - return - end + raise FormulaUnspecifiedError if ARGV.resolved_formulae.length != 1 gistify_logs(ARGV.resolved_formulae[0]) end |
