Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add brew doctor --ignore-warnings #17864

Closed
wants to merge 1 commit into from

Commits on Jul 25, 2024

  1. cmd/doctor: Add --ignore-warnings

    When `brew doctor` is run, `brew` exits with a non-zero status if any
    warnings or errors are encountered. However, this groups warnings and
    errors together, but (as the output notes) warnings can be innocuous:
    
    > Please note that these warnings are just used to help the Homebrew
    > maintainers with debugging if you file an issue. If everything you use
    > Homebrew for is working fine: please don't worry or file an issue;
    > just ignore this. Thanks!
    
    The `--ignore-warnings` switch makes it possible for automated tools
    interacting with Homebrew to distinguish between warnings and hard
    errors.
    
    ```
    $ brew doctor --ignore-warnings
    Please note that these warnings are just used to help the Homebrew maintainers
    with debugging if you file an issue. If everything you use Homebrew for is
    working fine: please don't worry or file an issue; just ignore this. Thanks!
    
    Warning: Some installed casks are deprecated or disabled.
    You should find replacements for the following casks:
      graphql-playground
    $ echo "$?"
    0
    ```
    
    Hard errors will still cause a non-zero exit status:
    
    ```
    $ brew doctor --ignore-warnings
    Please note that these warnings are just used to help the Homebrew maintainers
    with debugging if you file an issue. If everything you use Homebrew for is
    working fine: please don't worry or file an issue; just ignore this. Thanks!
    
    Warning: gettext files detected at a system prefix.
    These files can cause compilation and link failures, especially if they
    are compiled with improper architectures. Consider removing these files:
      /opt/homebrew/lib/libgettextlib.dylib
      /opt/homebrew/lib/libintl.dylib
      /opt/homebrew/include/libintl.h
    Error: unknown or unsupported macOS version: :dunno
    $ echo "$?"
    1
    ```
    9999years committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    ab56cff View commit details
    Browse the repository at this point in the history