What's Changed
🔧 Bootstrap Homebrew PATH for every shell
Previously brew shellenv was only evaluated when the user explicitly picked Homebrew's own bash. For every other shell — including the default /bin/bash and /bin/zsh — Homebrew's bin wasn't added to $PATH, so scripts invoking python3, jq, gh, etc. silently resolved to the older system binaries.
Now the app unconditionally evaluates brew shellenv (at both /opt/homebrew/bin/brew and /usr/local/bin/brew) when the brew binary exists. No-op if Homebrew isn't installed.
Why this matters: a user reported "script output is silently truncated". Root cause was an inline python3 -c heredoc using f-string backslash syntax — valid in Python 3.12+ (their interactive shell's Homebrew python3) but a SyntaxError in 3.9.6 (macOS's /usr/bin/python3 that the app was resolving instead). After the fix the script's Homebrew python3 is found and the output is complete.
✅ New integration test
Runs the failing user script through the exact Process+Pipe+decode+clean pipeline the app uses and asserts key output fragments survive. Protects against future regressions of this class.
更新内容
🔧 所有 shell 都自动注入 Homebrew PATH
之前 app 只在用户显式选择 Homebrew 版 bash 时才 eval $(brew shellenv)。对默认的 /bin/bash 和 /bin/zsh,Homebrew 的 bin 根本没进 $PATH,脚本里 python3、jq、gh 这些命令会静默解析到系统自带版本(通常版本更旧)。
现在只要 /opt/homebrew/bin/brew 或 /usr/local/bin/brew 存在,就一律先 eval 一次 brew shellenv。未安装 Homebrew 时是空操作。
这为什么重要:有用户反馈"脚本输出被截断"。根因是脚本里的 python3 -c heredoc 用到了 f-string 带反斜杠的语法,Python 3.12+ 支持(用户交互终端的 Homebrew python3),但 Python 3.9.6(macOS 自带的 /usr/bin/python3,app 解析到的是这个)直接 SyntaxError 退出。修复后 app 能正确找到 Homebrew 的 python3,输出完整。
✅ 新增集成测试
用和 app 完全相同的 Process+Pipe+decode+clean 管道跑一遍失败脚本,断言关键输出片段都在。避免这类问题再次出现。
Full Changelog: v1.4.0...v1.4.1