fix(core): 禁用 Homebrew 交互模式并更新文档

* 设置 HOMEBREW_NO_ASK=1 环境变量以跳过升级时的确认提示
* 实现静默批量更新,自动对升级请求回答 yes
* 在 README 文档中补充关于自动回答机制的说明
* 更新文档中的“常见问题”部分,解释脚本如何处理交互逻辑
This commit is contained in:
2026-07-26 23:23:26 +08:00
parent f0ce129244
commit e55d63991c
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -233,6 +233,9 @@ HB_SKIP_DOCTOR=1 brewup
5. `brew cleanup --prune=all`,一次性清理全部缓存和旧版本
6. 汇总失败项并返回最终状态码
脚本会设置 Homebrew 官方的 `HOMEBREW_NO_ASK=1`,因此升级时不会停在
`Do you want to proceed with the upgrade? [y/n]`,其行为等价于自动回答 `y`
## 常见问题
### 首次运行为什么要输入 sudo 密码?
+3
View File
@@ -18,6 +18,9 @@ export PATH
# 禁止 Homebrew 在每个安装步骤后自动清理;统一在最后一步彻底清理。
export HOMEBREW_NO_INSTALL_CLEANUP=1
# brewup 本身就是明确的批量升级操作;关闭 Homebrew 的 Ask 模式,
# 等价于对“Do you want to proceed with the upgrade?”自动回答 y。
export HOMEBREW_NO_ASK=1
hex_channel_to_16bit() {
local hex="$1" value maximum bits