mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-30 23:51:15 -03:00
Correct $status for certain pipeline-aborting failures
If we refused to launch a job because of a "pipeline aborting" error, then it's the caller's responsibility to set $status. Fixes #7540
This commit is contained in:
@@ -1391,7 +1391,13 @@ end_execution_reason_t parse_execution_context_t::run_1_job(const ast::job_t &jo
|
||||
}
|
||||
|
||||
// Actually execute the job.
|
||||
if (!exec_job(*this->parser, job, block_io)) {
|
||||
if (!exec_job(*parser, job, block_io)) {
|
||||
// No process in the job successfully launched.
|
||||
// Ensure statuses are set (#7540).
|
||||
if (auto statuses = job->get_statuses()) {
|
||||
parser->set_last_statuses(statuses.value());
|
||||
parser->libdata().status_count++;
|
||||
}
|
||||
remove_job(*this->parser, job.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user