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 }}
Repository navigation
[errexit] set -e 误杀 if 体内 && 列表失败:rubash 整壳退出 rc=1,GNU 豁免后打印 R rc=0 #507
POSIX XCU 2.14 (set -e):"The -e setting shall be ignored when executing the compound-list following the while, until, if, or elif reserved word, a pipeline beginning with the ! reserved word, or any command of an AND-OR list other than the last."
Bash Reference Manual(set -e):"The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the command following the final && or ||..."
GNU 实测:set -e; false && true; echo ok 打印 ok(rubash 此形式正确,分歧只在复合命令体内)。
set -e
whiletrue;dofalse&&echo y;break;done;echo W # rubash 退出 rc1 / GNU 打印 W rc0foriin 1;dofalse&&echo y;done;echo F # rubash 退出 rc1 / GNU 打印 F rc0case x in x) false&&true;; esac;echo C # rubash 退出 rc1 / GNU 打印 C rc0
Activity
caomengxuan666 commentedon Oct 12, 2026
审计增量(huck 443-issue 全量对照,issues-audit we-diverge A1):本 issue 的 if 体格在 764b9dd 仍复现;同根的其余复合构造体末尾格全部同病,不需要新开 issue,统一在此跟踪:
边界矩阵(GNU 实测 + rubash 对照,LEDGER huck#676):
{ }体 / 子壳 / 函数调用处:rubash 与 GNU 一致(该退的退)✔&&列表、体末尾普通false:双侧一致 ✔&&列表经豁免路径失败这一格错:if/while/for/case 四形全中。跨实现互证:huck#676 "set -e exits on a failing
&&list when it is the LAST command of an if/for/case/brace body"(portable,sev:high,已修复)——与 #507 正文引用的 huck#676 同一条,此处补齐 while/for/case 三形的语料证据(huck errexit_adjudication harness,fragment F067 族)。fix: P1 semantic batch - errexit body adjudication, stdin rc, write-f…
fix(executor): compound redirection failures reach the ERR trap again…
caomengxuan666 commentedon Oct 12, 2026
Fixed and merged (see the linked PR in timeline).