mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user