mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
Fix sporadic cancellation test failures
If a Control-C is received during expanding a command substitution, we may execute the job anyways, because we do not check for cancellation after the expansion. Ensure that does not happen. This should fix sporadic test failures in the cancellation unit test.
This commit is contained in:
parent
72de8768d9
commit
ebc262cfba
1 changed files with 5 additions and 0 deletions
|
@ -926,6 +926,11 @@ parse_execution_result_t parse_execution_context_t::expand_arguments_from_nodes(
|
|||
}
|
||||
}
|
||||
|
||||
// We may have received a cancellation during this expansion.
|
||||
if (parser->cancellation_requested) {
|
||||
return parse_execution_cancelled;
|
||||
}
|
||||
|
||||
return parse_execution_success;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue