% man brew
...
HOMEBREW_INSTALL_FROM_API
If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew´s
API instead of needing (large, slow) local checkouts of these repositories.
Note: Setting HOMEBREW_INSTALL_FROM_API is not compatible with Homebrew´s developer mode so
will error (as Homebrew development needs a full clone).
设置这个环境变量以后可以 brew untap homebrew/core brew untap homebrew/cask
. 省几百 MB 空间. 先不说缺不缺这些空间, 把那十多年的 formula 历史放普通用户硬盘上本来就不科学.
副作用未知.
1
leonme 2022-08-12 10:53:17 +08:00 via iPhone
副作用未知……
|
2
clrss OP 感觉不好用, 比如 cleanup 会卡死.
早年是 shallow clone, 没那么占空间, 后来 GitHub 说 CPU 占用太大不要 shallow. 那我们换个源吧, 他们没说不能 shallow. export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.ustc.edu.cn/homebrew-core.git 或 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git 需要改下 brew 代码, 我就不教了, 免得上面两镜像管理员来打我. |
3
julyclyde 2022-08-15 11:02:05 +08:00
|