Skip to content

Remove awk dependency from POSIX installer#362

Open
boilcy wants to merge 1 commit into
RubyMetric:devfrom
boilcy:fix/remove-awk-installer-dependency
Open

Remove awk dependency from POSIX installer#362
boilcy wants to merge 1 commit into
RubyMetric:devfrom
boilcy:fix/remove-awk-installer-dependency

Conversation

@boilcy

@boilcy boilcy commented Jun 15, 2026

Copy link
Copy Markdown

问题

在缺少 awk 的环境中,POSIX 安装脚本会在识别平台时失败,导致 platform 为空。

即使当前机器本身有可用的预编译二进制文件,安装脚本也会误判为“不支持的平台”,并提示用户使用 chsrc-bootstrap 或自行编译。

$ curl https://chsrc.run/posix | sudo bash
bash: line 149: awk: command not found
[ERROR] 抱歉,暂无预编译二进制文件供你所在的平台:  使用。请使用 chsrc-bootstrap 或 自行编译

修改

将平台和系统名称的小写转换从 awk 改为 tr

uname -s | tr '[:upper:]' '[:lower:]'
uname -o | tr '[:upper:]' '[:lower:]'

tr 已经在同一脚本的 get_arch() 中使用,因此这个修改不会引入新的依赖。

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Hi @boilcy,

❤️ 感谢你的贡献!你的 PR 当前基于 main 分支,请修改使用 dev 分支

@boilcy boilcy marked this pull request as draft June 15, 2026 16:11
@boilcy boilcy marked this pull request as ready for review June 15, 2026 16:11
@boilcy boilcy marked this pull request as draft June 15, 2026 16:11
@boilcy boilcy changed the base branch from main to dev June 15, 2026 16:12
@boilcy boilcy marked this pull request as ready for review June 15, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant