Skip to content

fix: use eval to expand mkbootimg arguments properly - #217

Merged
xiaoleGun merged 1 commit into
xiaoleGun:mainfrom
5kind:pull-requests
Oct 25, 2026
Merged

xiaoleGun merged 1 commit into
xiaoleGun:mainfrom
5kind:pull-requests

Conversation

@5kind

@5kind 5kind commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

问题

scripts/package.sh 中 make_boot_image() 用裸变量展开 $fmt 传递 mkbootimg 参数:

python3 "${tools}/mkbootimg.py" $fmt -o boot.img || die "mkbootimg failed"

$fmt 中若含带空格的参数值(如 --cmdline "console=..."),word splitting 会把它拆成多个 token,导致 mkbootimg 解析失败。

失败运行:Package artifacts 阶段由于 ValueError: Unrecognized arguments 而 mkbootimg failed

修复

eval "python3 \"${tools}/mkbootimg.py\" ${fmt} -o boot.img" \
    || die "mkbootimg failed"

用 eval 重新解析整条命令,保留引号内的参数为单个 token。

成功运行:fix: use eval to expand mkbootimg arguments properly #67

相关提交:5kind/KernelSU_Action@35ff4ce

@xiaoleGun
xiaoleGun merged commit 26c1b95 into xiaoleGun:main Oct 25, 2026
Sahil-Rochlani added a commit to Sahil-Rochlani/KernelSU_Action that referenced this pull request Dec 1, 2026
fix: use eval to expand mkbootimg arguments properly (xiaoleGun#217)
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.

2 participants