Skip to content

Commit fed1a95

Browse files
committed
docs: v0.8.2 发布说明
1 parent 544e0d2 commit fed1a95

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

docs/RELEASE-NOTES-v0.8.2.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# v0.8.2 发布说明
2+
3+
## 修复:Homebrew 安装/升级时的三条补全生成警告
4+
5+
从 v0.8.x 起,`brew install` / `brew upgrade base-code` 会刷出三条警告:
6+
7+
```
8+
Warning: Failed to generate bash completions from .../base-code: Failure while executing;
9+
`/usr/bin/sandbox-exec -f .../homebrew.sb ... base-code completion bash`
10+
was terminated by uncaught signal KILL.
11+
```
12+
13+
zsh、fish 各一条。看起来像装坏了,实际功能不受影响——但三个 shell 的命令补全确实没能装上。
14+
15+
### 原因
16+
17+
Homebrew 把「执行二进制生成补全」当作一个安装 artifact,其执行顺序是:
18+
19+
```
20+
PreflightBlock → …Binary… → GeneratedCompletion → PostflightBlock
21+
```
22+
23+
而 cask 原先在 **postflight** 里清除 macOS 的 quarantine 属性——晚了一步。轮到生成补全时,二进制仍带着隔离属性,而 Go 工具链产出的是 ad-hoc 签名(`Identifier=a.out`,非 Developer ID),过不了 Gatekeeper 的首次评估,进程在沙箱里被 SIGKILL。
24+
25+
### 修复
26+
27+
把清除 quarantine 的钩子从 postflight 移到 **preflight**,赶在补全生成之前。已用本地 A/B 对照验证:postflight 精确复现警告,preflight 零警告且补全正常装上。
28+
29+
> 复现提示(给将来排查同类问题的人):Gatekeeper 按 cdhash 缓存评估结果,对已被放行过的二进制补打隔离属性是杀不掉的,会得到假阴性。必须用该机器从未评估过的全新二进制才能复现。
30+
31+
## 兼容性
32+
33+
仅改 Homebrew cask 的生成配置,二进制本身与 v0.8.1 功能完全一致。Scoop(Windows)不受影响。
34+
35+
## 升级
36+
37+
```bash
38+
brew update && brew upgrade base-code # 本次升级后警告消失,补全装上
39+
scoop update base-code # Windows
40+
```

0 commit comments

Comments
 (0)