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

Use environment variables consistently #19153

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

MikeMcQuaid
Copy link
Member

  • use e.g. $HOMEBREW_* for cases where only the environment variable is the entire backtick-quoted string
  • use e.g. ${HOMEBREW_*} for cases where the environment variable is part of a backtick-quoted string to make clear what parts are variable and what parts are not
  • use export HOMEBREW_*=... for cases where we're talking about setting the environment variable (because it likely needs to be exported to work how they want)

Inspired by Homebrew/homebrew-bundle#1579 making similar changes for Homebrew/homebrew-bundle

MikeMcQuaid added a commit to Homebrew/homebrew-services that referenced this pull request Jan 27, 2025
MikeMcQuaid added a commit to Homebrew/homebrew-command-not-found that referenced this pull request Jan 27, 2025
@MikeMcQuaid MikeMcQuaid enabled auto-merge January 27, 2025 13:44
@MikeMcQuaid MikeMcQuaid changed the title env_config: use environment variables consistently Use environment variables consistently Jan 27, 2025
- use e.g. `$HOMEBREW_*` for cases where only the environment variable
  is the entire backtick-quoted string
- use e.g. `${HOMEBREW_*}` for cases where the environment variable is
  part of a backtick-quoted string to make clear what parts are variable
  and what parts are not
- use `export HOMEBREW_*=...` for cases where we're talking about
  setting the environment variable (because it likely needs to be
  exported to work how they want)

Inspired by Homebrew/homebrew-bundle#1579 making
similar changes for Homebrew/homebrew-bundle.
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jan 27, 2025
Merged via the queue into master with commit e21cbd6 Jan 27, 2025
29 checks passed
@MikeMcQuaid MikeMcQuaid deleted the env_var_consistency branch January 27, 2025 14:43
vst_plugindir: "~/Library/Audio/Plug-Ins/VST",
vst3_plugindir: "~/Library/Audio/Plug-Ins/VST3",
screen_saverdir: "~/Library/Screen Savers",
colorpickerdir: "${HOME}/Library/ColorPickers",
Copy link
Member

Choose a reason for hiding this comment

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

Does Pathname("${HOME}").expand_path work?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Bo98 No. I'll revert the $HOME changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants