mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-09 08:51:14 -03:00
Fix regression causing "nosuchcommand || hello" to short-circuit
Commit 3534c07584 (Adopt the new AST in parse_execution, 2020-07-03)
added to parse_execution_context_t::run_job_conjunction an early
return when any job in a job conjunction fails to launch. This causes
"nosuchcommand || echo hello" to not execute the continuation.
Fix this by restoring the previous behavior.
Fixes #12654
This commit is contained in:
@@ -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)
|
||||
====================================
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user