|
3 | 3 |
|
4 | 4 | raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"]
|
5 | 5 |
|
6 |
| -# Path to `bin/brew` main executable in `HOMEBREW_PREFIX` |
7 |
| -# Used for e.g. permissions checks. |
8 |
| -HOMEBREW_ORIGINAL_BREW_FILE = Pathname(ENV.fetch("HOMEBREW_ORIGINAL_BREW_FILE")).freeze |
9 |
| - |
10 |
| -# Path to the executable that should be used to run `brew`. |
11 |
| -# This may be HOMEBREW_ORIGINAL_BREW_FILE or HOMEBREW_BREW_WRAPPER. |
| 6 | +# The path to the executable that should be used to run `brew`. |
| 7 | +# This may be HOMEBREW_ORIGINAL_BREW_FILE or HOMEBREW_BREW_WRAPPER depending on |
| 8 | +# the system configuration. Favour this instead of running `brew` and expecting |
| 9 | +# it to be in the `PATH`. |
| 10 | +# @api public |
12 | 11 | HOMEBREW_BREW_FILE = Pathname(ENV.fetch("HOMEBREW_BREW_FILE")).freeze
|
13 | 12 |
|
14 |
| -# Where we link under |
| 13 | +# Where Homebrew is installed and files are linked to. |
| 14 | +# @api public |
15 | 15 | HOMEBREW_PREFIX = Pathname(ENV.fetch("HOMEBREW_PREFIX")).freeze
|
16 | 16 |
|
| 17 | +# Where Homebrew stores built formulae packages, linking (non-keg-only) ones |
| 18 | +# back to `HOMEBREW_PREFIX`. |
| 19 | +# @api public |
| 20 | +HOMEBREW_CELLAR = Pathname(ENV.fetch("HOMEBREW_CELLAR")).freeze |
| 21 | + |
| 22 | +# Where Homebrew downloads (bottles, source tarballs, casks etc.) are cached. |
| 23 | +# @api public |
| 24 | +HOMEBREW_CACHE = Pathname(ENV.fetch("HOMEBREW_CACHE")).freeze |
| 25 | + |
| 26 | +# Where Homebrew stores temporary files. |
| 27 | +# We use `/tmp` instead of `TMPDIR` because long paths break Unix domain |
| 28 | +# sockets. |
| 29 | +# @api public |
| 30 | +HOMEBREW_TEMP = Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp| |
| 31 | + tmp.mkpath unless tmp.exist? |
| 32 | + tmp.realpath |
| 33 | +end.freeze |
| 34 | + |
| 35 | +# Path to `bin/brew` main executable in `HOMEBREW_PREFIX` |
| 36 | +# Used for e.g. permissions checks. |
| 37 | +HOMEBREW_ORIGINAL_BREW_FILE = Pathname(ENV.fetch("HOMEBREW_ORIGINAL_BREW_FILE")).freeze |
| 38 | + |
17 | 39 | # Where `.git` is found
|
18 | 40 | HOMEBREW_REPOSITORY = Pathname(ENV.fetch("HOMEBREW_REPOSITORY")).freeze
|
19 | 41 |
|
|
35 | 57 | # Where we store lock files
|
36 | 58 | HOMEBREW_LOCKS = (HOMEBREW_PREFIX/"var/homebrew/locks").freeze
|
37 | 59 |
|
38 |
| -# Where we store built products |
39 |
| -HOMEBREW_CELLAR = Pathname(ENV.fetch("HOMEBREW_CELLAR")).freeze |
40 |
| - |
41 | 60 | # Where we store Casks
|
42 | 61 | HOMEBREW_CASKROOM = Pathname(ENV.fetch("HOMEBREW_CASKROOM")).freeze
|
43 | 62 |
|
44 |
| -# Where downloads (bottles, source tarballs, etc.) are cached |
45 |
| -HOMEBREW_CACHE = Pathname(ENV.fetch("HOMEBREW_CACHE")).freeze |
46 |
| - |
47 | 63 | # Where formulae installed via URL are cached
|
48 | 64 | HOMEBREW_CACHE_FORMULA = (HOMEBREW_CACHE/"Formula").freeze
|
49 | 65 |
|
50 | 66 | # Where build, postinstall and test logs of formulae are written to
|
51 | 67 | HOMEBREW_LOGS = Pathname(ENV.fetch("HOMEBREW_LOGS")).expand_path.freeze
|
52 | 68 |
|
53 |
| -# Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets |
54 |
| -HOMEBREW_TEMP = Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp| |
55 |
| - tmp.mkpath unless tmp.exist? |
56 |
| - tmp.realpath |
57 |
| -end.freeze |
58 |
| - |
59 | 69 | # Where installed taps live
|
60 | 70 | HOMEBREW_TAP_DIRECTORY = (HOMEBREW_LIBRARY/"Taps").freeze
|
61 | 71 |
|
|
0 commit comments