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

cli/parser: check env var directly if there's no EnvConfig method. #16043

Merged

Conversation

MikeMcQuaid
Copy link
Member

Before this change, external commands, whether official or not, cannot use the env: DSL for Homebrew::CLI::Parser without adding their environment variable to Homebrew::EnvConfig.

Instead, if the method is not defined, check the environment variable directly. This allows env: to be used as expected and allows simplifying some (new) code in e.g. brew bundle.

Before this change, external commands, whether official or not, cannot
use the `env:` DSL for `Homebrew::CLI::Parser` without adding their
environment variable to `Homebrew::EnvConfig`.

Instead, if the method is not defined, check the environment variable
directly. This allows `env:` to be used as expected and allows
simplifying some (new) code in e.g. `brew bundle`.
Copy link
Member

@issyl0 issyl0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪄

@MikeMcQuaid MikeMcQuaid merged commit d799bd4 into Homebrew:master Sep 27, 2023
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cli_parser_env_external_commands branch September 27, 2023 11:50
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 28, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants