diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 670becbbe..390582f8d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -33,6 +33,7 @@ Regression fixes: ----------------- - Vi mode ``dl`` (:issue:`12461`). - (from 4.6) Backspace after newline (:issue:`12583`). +- (from 3.2) ``nosuchcommand || echo hello`` executes the right hand side again (:issue:`12654`). fish 4.6.0 (released March 28, 2026) ==================================== diff --git a/src/parse_execution.rs b/src/parse_execution.rs index 71c6ecf1c..77b018df5 100644 --- a/src/parse_execution.rs +++ b/src/parse_execution.rs @@ -1749,9 +1749,6 @@ fn run_job_conjunction( } let mut result = self.run_1_job(ctx, &job_expr.job, associated_block); for jc in &job_expr.continuations { - if result != EndExecutionReason::Ok { - return result; - } if let Some(reason) = self.check_end_execution(ctx) { return reason; } diff --git a/tests/checks/andandoror.fish b/tests/checks/andandoror.fish index c074ba0b8..a131de06d 100644 --- a/tests/checks/andandoror.fish +++ b/tests/checks/andandoror.fish @@ -138,3 +138,10 @@ not --help >/dev/null echo $status # CHECK: 0 # CHECK: 0 + +PATH= cat || echo cat failed +# CHECKERR: fish: Unknown command: cat +# CHECKERR: {{.*}}/andandoror.fish (line 142): +# CHECKERR: PATH= cat || echo cat failed +# CHECKERR: ^~^ +# CHECK: cat failed