mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Standardize unmatched wildcard errors
Unmatched wildcard errors during parsing are normally only reported when run interactively. The switch command was unconditionally reporting them anyway (and not setting the status to 124). Fix it so switch goes through the same code path as everything else.
This commit is contained in:
parent
5d1ddc9c58
commit
0372cdbe7e
1 changed files with 1 additions and 3 deletions
|
@ -552,9 +552,7 @@ parse_execution_result_t parse_execution_context_t::run_switch_statement(const p
|
|||
|
||||
case EXPAND_WILDCARD_NO_MATCH:
|
||||
{
|
||||
/* Store the node that failed to expand */
|
||||
report_error(switch_value_node, WILDCARD_ERR_MSG, switch_value.c_str());
|
||||
result = parse_execution_errored;
|
||||
result = report_unmatched_wildcard_error(switch_value_node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue