Repository navigation
fix: 升级 funk v2.0.5 —— 修复 upgrade 后二进制丢失执行权限 - #33
Merged
Merged
Conversation
- 旧依赖 funk v2.0.0-beta.16 的 upgrade 命令:go-getter 下载(HTTP 文件默认 0644) 后直接 os.Rename 覆盖自身,执行位丢失,升级后无法运行 - funk v2.0.5 已修复:rename 后恢复原权限(回退 0755) - 连带升级 redant v0.4.0 / x/sys / x/term 验证: CLI 全命令冒烟 + verify/buf build/upgrade list 正常,测试与 lint 全绿
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
`protobuild upgrade` 升级后二进制没有执行权限,无法运行。
根因:旧依赖 `funk v2.0.0-beta.16` 的 upgrade 流程是 `go-getter 下载(HTTP 文件默认 0644) → os.Rename 覆盖自身`,全程没有 chmod,执行位丢失。
修复
升级 `github.com/pubgo/funk/v2` v2.0.0-beta.16 → v2.0.5(上游已修复:rename 后恢复原权限,回退 0755)。
连带升级 redant v0.0.5 → v0.4.0、x/sys、x/term。
验证
注意
本次修复随下个版本发布后,存量用户最后一次 upgrade 仍会踩到这个问题(旧二进制本身没有 chmod 逻辑),
需要手动 `chmod +x $(which protobuild)` 一次或重新安装;之后的 upgrade 不再丢失权限。建议发 v0.3.1 时在 release note 中说明。