• Issy Long's avatar
    dev-cmd/unbottled: Fail nicely if analytics data can't be retrieved · ca999a81
    Issy Long 创作于
    - When testing `brew unbottled <formula>` this crashed because I, as a
      maintainer, have `HOMEBREW_NO_ANALYTICS` set on all my machines to
      avoid polluting the analytics with test installs.
    
    ```
    ❯ brew unbottled
    ==> Getting formulae...
    ==> Getting analytics data...
    Error: undefined method `[]' for nil:NilClass
    /usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:89:in `formulae_all_sort_installs_from_args'
    /usr/local/Homebrew/Library/Homebrew/dev-cmd/unbottled.rb:49:in `unbottled'
    /usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
    ```
    ca999a81