- A user reported the following error when running `brew gist-logs`,
reproducible with any formula:
```
$ brew gist-logs rustup-init
Error: undefined method `length' for nil:NilClass
Please report this bug:
https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/gist-logs.rb:145:in `gist_logs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:102:in
```
- From what I can tell, `gist_logs_args.parse` had ended up in the wrong
method. The `gistify_logs` method already has `formula` (ie the
formula name) passed into it. But it's the `gist_logs` method that needs
to do the argument parsing. This was discovered by looking at some other
recently changed ARGV => Homebrew.args code like cmd/info.
- Make `gist-logs` perform more checks
- Don't complain about a non-/usr/local install at install time unless
actually building from source.
- Show more checks output on a build error
- Improve naming of checks methods
While working on f10691bcc, I noticed this odd comment and decided to
investigate. I wasn't able to reproduce the undesirable behavior because
I cannot get 1.8.7 to compile with rvm but I did notice through some
testing that iTerm2 displays a lock character when echo mode is
disabled. My intent had been to remove this method because Homebrew has
moved past a Ruby version that would necessitate the "hack" but this
method's behavior is actually desirable today, so I changed the comment
to remove the potential flag and instead left a comment explaining
a good second reason for the method.
Improve the GitHub API scope and token related messaging by
autopopulating the scopes we need on the new scopes page and, in the
case of a lacking a scope we need, output what scope was required.
Also, DRY up the personal access token code.
* Move GitHub API module to utils/github.rb.
* Move curl method to utils/curl.rb.
* global: use long curl arguments and an array.
This makes the code more self-documenting.
* utils/curl: support reading curl's output.
* utils/github: use curl instead of open-uri.
It has far better proxy support.
* pull: set Homebrew user agent.
* gist-logs: remove trailing whitespace.
* gist-logs: use first instead of [0].
Easier to read.
* gist-logs: use curl-based GitHub.open method.