Repository navigation
fix(parser): accept N>> append redirect with procsub target (Refs #3505) - #3519
Conversation
Root cause: collect_trailing_redirections (src/parser/redirections.rs)
handled the RedirectOut arm by trying both procsub-target helpers, but
the Append arm tried only the combined &>/&>> helper, which declines a
numbered target like "3>>". The generic target parser then refused the
">" and the parser broke with "syntax error near unexpected token
'3>>'", leaving the Append redirect unconsumed. The lexer already
emitted the correct Append("3>>") token and simple commands already
worked because assign_append_target tries
append_process_substitution_redirect_target; the trailing-redirection
collector was missing the same arm.
Fix: mirror redirect_assign.rs in the Append arm - try
append_process_substitution_redirect_target for numbered append
targets before falling back to the plain target parser.
GNU anchor: bash 5.3 parse.y:574 (append redirection grammar accepts
a word target incl. process substitution).
Regression pin: tests/issue3505_numbered_append_redirect_procsub.rs
(9 cells; verified on Linux: head 9/9, base fail-first on the numbered
append shapes, adjacent parser_redirection_tests 68/0).
本 PR 删除了什么:无删除(纯新增 arm + 新增钉子文件)。
Verification note: fix and pin were verified by the fix lane on the
Simular box (Linux) against base 5219be9; captain review of the
merged shape still applies before merge.
队长复核 PASS结论:合入。 Refs-only,合入后队长手关 #3505。 Diff(已核对原文,与盘上已核修法逐字节一致): 2 文件 +290/−0: Linux 腿(
CI(run 43540355189,失败日志原文已核): 3 红 job(GNU 1349/1/4、macOS 1242/1/4、Linux Rust tests 0/1)唯一失败名均为 交集: merge-base 公开欠账(X299 钉执行腿): 隧道本轮两次探针均未通(一次 删除节: 正文已有(无删除),与 diff 一致。 |
合入后复核(#3519 剩余欠账):X299/Windows 钉执行腿 → pin 本身在 Windows 是红的,产品行为是对的合并树 1.
|
欠账闭合记录(#3519 的 X299/Windows 钉执行腿)合并形补跑发现钉在 Windows 是 1/9(8 红全是
因此本 PR 的合入后验证(F1/bare/plain/subshell/if/fd10/simple/trunc/stderr 九形)现在双平台都有可执行证据。Linux 侧的执行腿仍受 master 既有 |
fix(parser): accept N>> append redirect with procsub target (Refs #3505)
Root cause: collect_trailing_redirections (src/parser/redirections.rs)
handled the RedirectOut arm by trying both procsub-target helpers, but
the Append arm tried only the combined &>/&>> helper, which declines a
numbered target like "3>>". The generic target parser then refused the
">" and the parser broke with "syntax error near unexpected token
'3>>'", leaving the Append redirect unconsumed. The lexer already
emitted the correct Append("3>>") token and simple commands already
worked because assign_append_target tries
append_process_substitution_redirect_target; the trailing-redirection
collector was missing the same arm.
Fix: mirror redirect_assign.rs in the Append arm - try
append_process_substitution_redirect_target for numbered append
targets before falling back to the plain target parser.
GNU anchor: bash 5.3 parse.y:574 (append redirection grammar accepts
a word target incl. process substitution).
Regression pin: tests/issue3505_numbered_append_redirect_procsub.rs
(9 cells; verified on Linux: head 9/9, base fail-first on the numbered
append shapes, adjacent parser_redirection_tests 68/0).
本 PR 删除了什么:无删除(纯新增 arm + 新增钉子文件)。
Verification note: fix and pin were verified by the fix lane on the
Simular box (Linux) against base 5219be9; captain review of the
merged shape still applies before merge.