Skip to content
Permalink
Branch: master
Commits on Jan 14, 2020
  1. Merge pull request #6936 from issyl0/fix-cmd-gist-logs-arg-parse-bug

    issyl0 committed Jan 14, 2020
    cmd/gist-logs: Fix bug with parsing of command-line arguments
  2. cmd/gist-logs: Fix bug with parsing of command-line arguments

    issyl0 committed Jan 14, 2020
    - 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.
You can’t perform that action at this time.