You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Pipeline stage-2 native exe gets argv with embedded double quotes stripped when stage-1 is a quoted-variable command with no redirections (function/if context) — rustup-init.sh check_help_for false-warns #205
Real-world symptom (rustup-init.sh line 773, check_help_for):
if"$_cmd" --help | grep -q '"--help all"';then
Under GNU 5.3.0 (WSL): grep receives the pattern "--help all" intact, finds the string in curl --help output, no warning.
Under rubash (Windows, Git grep on PATH): grep: unknown option -- help all → check_help_for returns false → rustup prints TWO false warnings ("Not enforcing strong cipher suites for TLS", "Not enforcing TLS v1.2") that GNU never prints.
Stage-2 = bash script (showargs.sh) → intact even in the failing shape (m5) — corruption is in the native-exe argv/command-line encoding path, not word splitting.
Pattern without a space ('"--help') → intact (q5); pattern without leading quote-dash → intact.
Top-level if + literal cmd → intact; positional "$1" as stage-1 with a redirect → intact (h4).
GNU spec: argv bytes must survive to the spawned program verbatim (execute_cmd.c execute_disk_command → shell_execve); no quoting layer may reinterpret argument contents. This is not an MSYS2-convention artifact: rubash itself passes the same pattern correctly in the sibling shapes above, so the failing path has its own encoder.
Classification: rubash-caused; found in real installer usage (rustup-init.sh is one of the most-executed installer snippets).
Activity
caomengxuan666 commentedon Sep 27, 2026
已修复并合入 master(commit f15bacd,lane wt/pipe)。根因:进程内管道段间用文本层 expand_word 重解析了已去引号的 argv 文本,吃掉了数据中的双引号字符;GNU 语义是管道各段从已解析的 WORD 结构展开一次、dequote_string 只剥 CTLESC(execute_cmd.c:2620 execute_pipeline + subst.c:4807),段间从不重解析。12 形态矩阵(顶层/if/函数 × 引号变量/字面 stage-1 × 有无重定向 × 原生/内建 stage-2,含真实 curl rustup 形态)与 WSL GNU Bash 5.3.0 字节一致,rustup-init.sh 的 check_help_for 不再误报。感谢报告!
pipeline argv + array element IFS split: #205 argv quotes, GNU per-wo…
tests/regression: GNU-diff golden suite + suite-slice snapshots + eco…