Skip to content

Commit 23facb2

Browse files
authored
Merge pull request #19155 from Homebrew/revert-19153-env_var_consistency
Use `~` instead of `${HOME}`
2 parents e21cbd6 + 7ff99e2 commit 23facb2

File tree

13 files changed

+201
-210
lines changed

13 files changed

+201
-210
lines changed

Library/Homebrew/cask/config.rb

+13-13
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ class Config
1616
{
1717
appdir: "/Applications",
1818
keyboard_layoutdir: "/Library/Keyboard Layouts",
19-
colorpickerdir: "${HOME}/Library/ColorPickers",
20-
prefpanedir: "${HOME}/Library/PreferencePanes",
21-
qlplugindir: "${HOME}/Library/QuickLook",
22-
mdimporterdir: "${HOME}/Library/Spotlight",
23-
dictionarydir: "${HOME}/Library/Dictionaries",
24-
fontdir: "${HOME}/Library/Fonts",
25-
servicedir: "${HOME}/Library/Services",
26-
input_methoddir: "${HOME}/Library/Input Methods",
27-
internet_plugindir: "${HOME}/Library/Internet Plug-Ins",
28-
audio_unit_plugindir: "${HOME}/Library/Audio/Plug-Ins/Components",
29-
vst_plugindir: "${HOME}/Library/Audio/Plug-Ins/VST",
30-
vst3_plugindir: "${HOME}/Library/Audio/Plug-Ins/VST3",
31-
screen_saverdir: "${HOME}/Library/Screen Savers",
19+
colorpickerdir: "~/Library/ColorPickers",
20+
prefpanedir: "~/Library/PreferencePanes",
21+
qlplugindir: "~/Library/QuickLook",
22+
mdimporterdir: "~/Library/Spotlight",
23+
dictionarydir: "~/Library/Dictionaries",
24+
fontdir: "~/Library/Fonts",
25+
servicedir: "~/Library/Services",
26+
input_methoddir: "~/Library/Input Methods",
27+
internet_plugindir: "~/Library/Internet Plug-Ins",
28+
audio_unit_plugindir: "~/Library/Audio/Plug-Ins/Components",
29+
vst_plugindir: "~/Library/Audio/Plug-Ins/VST",
30+
vst3_plugindir: "~/Library/Audio/Plug-Ins/VST3",
31+
screen_saverdir: "~/Library/Screen Savers",
3232
}.freeze,
3333
T::Hash[Symbol, String],
3434
)

Library/Homebrew/cmd/nodenv-sync.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Cmd
99
class NodenvSync < AbstractCommand
1010
cmd_args do
1111
description <<~EOS
12-
Create symlinks for Homebrew's installed NodeJS versions in `${HOME}/.nodenv/versions`.
12+
Create symlinks for Homebrew's installed NodeJS versions in `~/.nodenv/versions`.
1313
1414
Note that older version symlinks will also be created so e.g. NodeJS 19.1.0 will
1515
also be symlinked to 19.0.0.

Library/Homebrew/cmd/pyenv-sync.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Cmd
99
class PyenvSync < AbstractCommand
1010
cmd_args do
1111
description <<~EOS
12-
Create symlinks for Homebrew's installed Python versions in `${HOME}/.pyenv/versions`.
12+
Create symlinks for Homebrew's installed Python versions in `~/.pyenv/versions`.
1313
1414
Note that older patch version symlinks will be created and linked to the minor
1515
version so e.g. Python 3.11.0 will also be symlinked to 3.11.3.

Library/Homebrew/cmd/rbenv-sync.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Cmd
99
class RbenvSync < AbstractCommand
1010
cmd_args do
1111
description <<~EOS
12-
Create symlinks for Homebrew's installed Ruby versions in `${HOME}/.rbenv/versions`.
12+
Create symlinks for Homebrew's installed Ruby versions in `~/.rbenv/versions`.
1313
1414
Note that older version symlinks will also be created so e.g. Ruby 3.2.1 will
1515
also be symlinked to 3.2.0.

Library/Homebrew/cmd/shellenv.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class Shellenv < AbstractCommand
1919
querying them multiple times.
2020
To help guarantee idempotence, this command produces no output when Homebrew's `bin` and `sbin` directories
2121
are first and second respectively in your `PATH`. Consider adding evaluation of this command's output to
22-
your dotfiles (e.g. `${HOME}/.bash_profile` or `${HOME}/.zprofile` on macOS and `${HOME}/.bashrc` or
23-
`${HOME}/.zshrc` on Linux) with: `eval "$(brew shellenv)"`
22+
your dotfiles (e.g. `~/.bash_profile` or ~/.zprofile` on macOS and ~/.bashrc` or ~/.zshrc` on Linux) with:
23+
`eval "$(brew shellenv)"`
2424
2525
The shell can be specified explicitly with a supported shell name parameter. Unknown shells will output
2626
POSIX exports.

Library/Homebrew/dev-cmd/livecheck.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class LivecheckCmd < AbstractCommand
1414
Check for newer versions of formulae and/or casks from upstream.
1515
If no formula or cask argument is passed, the list of formulae and
1616
casks to check is taken from `HOMEBREW_LIVECHECK_WATCHLIST` or
17-
`${HOME}/.homebrew/livecheck_watchlist.txt`.
17+
`~/.homebrew/livecheck_watchlist.txt`.
1818
EOS
1919
switch "--full-name",
2020
description: "Print formulae and casks with fully-qualified names."

Library/Homebrew/env_config.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ module EnvConfig
9999
},
100100
HOMEBREW_CACHE: {
101101
description: "Use this directory as the download cache.",
102-
default_text: "macOS: `$HOME/Library/Caches/Homebrew`, " \
103-
"Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.",
102+
default_text: "macOS: `~/Library/Caches/Homebrew`, " \
103+
"Linux: `$XDG_CACHE_HOME/Homebrew` or `~/.cache/Homebrew`.",
104104
default: HOMEBREW_DEFAULT_CACHE,
105105
},
106106
HOMEBREW_CASK_OPTS: {
107107
description: "Append these options to all `cask` commands. All `--*dir` options, " \
108108
"`--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. " \
109109
"For example, you might add something like the following to your " \
110-
"`${HOME}/.profile`, `${HOME}/.bash_profile`, or `${HOME}/.zshenv`:" \
110+
"`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:" \
111111
"\n\n `export HOMEBREW_CASK_OPTS=\"--appdir=${HOME}/Applications --fontdir=/Library/Fonts\"`",
112112
},
113113
HOMEBREW_CLEANUP_MAX_AGE_DAYS: {
@@ -317,7 +317,7 @@ module EnvConfig
317317
description: "Consult this file for the list of formulae to check by default when no formula argument " \
318318
"is passed to `brew livecheck`.",
319319
default_text: "`${XDG_CONFIG_HOME}/homebrew/livecheck_watchlist.txt` if `$XDG_CONFIG_HOME` is set " \
320-
"or `${HOME}/.homebrew/livecheck_watchlist.txt` otherwise.",
320+
"or `~/.homebrew/livecheck_watchlist.txt` otherwise.",
321321
default: "#{ENV.fetch("HOMEBREW_USER_CONFIG_HOME")}/livecheck_watchlist.txt",
322322
},
323323
HOMEBREW_LOCK_CONTEXT: {
@@ -326,8 +326,8 @@ module EnvConfig
326326
},
327327
HOMEBREW_LOGS: {
328328
description: "Use this directory to store log files.",
329-
default_text: "macOS: `${HOME}/Library/Logs/Homebrew`, " \
330-
"Linux: `${XDG_CACHE_HOME}/Homebrew/Logs` or `${HOME}/.cache/Homebrew/Logs`.",
329+
default_text: "macOS: `~/Library/Logs/Homebrew`, " \
330+
"Linux: `${XDG_CACHE_HOME}/Homebrew/Logs` or `~/.cache/Homebrew/Logs`.",
331331
default: HOMEBREW_DEFAULT_LOGS,
332332
},
333333
HOMEBREW_MAKE_JOBS: {
@@ -450,9 +450,9 @@ module EnvConfig
450450
boolean: true,
451451
},
452452
HOMEBREW_SSH_CONFIG_PATH: {
453-
description: "If set, Homebrew will use the given config file instead of `${HOME}/.ssh/config` when " \
453+
description: "If set, Homebrew will use the given config file instead of `~/.ssh/config` when " \
454454
"fetching Git repositories over SSH.",
455-
default_text: "`${HOME}/.ssh/config`",
455+
default_text: "`~/.ssh/config`",
456456
},
457457
HOMEBREW_SUDO_THROUGH_SUDO_USER: {
458458
description: "If set, Homebrew will use the `SUDO_USER` environment variable to define the user to " \

Library/Homebrew/formula.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ def etc
11091109
end
11101110

11111111
# A subdirectory of `etc` with the formula name suffixed.
1112-
# e.g. `${HOMEBREW_PREFIX}/etc/[email protected]`
1112+
# e.g. `$HOMEBREW_PREFIX/etc/[email protected]`
11131113
# Anything using `pkgetc.install` will not overwrite other files on
11141114
# e.g. upgrades but will write a new file named `*.default`.
11151115
#

Library/Homebrew/manpages/brew.1.md.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ files:
177177

178178
* `/etc/homebrew/brew.env` (system-wide)
179179

180-
* `$HOMEBREW_PREFIX/etc/homebrew/brew.env` (prefix-specific)
180+
* `${HOMEBREW_PREFIX}/etc/homebrew/brew.env` (prefix-specific)
181181

182182
* `$XDG_CONFIG_HOME/homebrew/brew.env` if `$XDG_CONFIG_HOME` is set or
183-
`$HOME/.homebrew/brew.env` otherwise (user-specific)
183+
`~/.homebrew/brew.env` otherwise (user-specific)
184184

185185
User-specific environment files take precedence over prefix-specific files and
186186
prefix-specific files take precedence over system-wide files (unless

0 commit comments

Comments
 (0)