aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_execution.h
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-10-13 18:47:13 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-10-13 18:51:51 -0700
commitcab115c8b9933ae7db9412c66d452c0ccb2d7152 (patch)
tree8db3e07a0c6cb5ada8d6f8266bf0bfbb2175e19c /parse_execution.h
parent4568359e27e4e1f5c07ad1dd533c55e3d58bdd64 (diff)
Don't stop job execution on wildcard errors
Wildcard errors are only reported interactively, and they're also not really errors. Commands with multiple wildcards would in fact continue executing if at least one wildcard matched, which is quite surprising. But they would report an error if there is only one wildcard in the arguments list and the wildcard has no match, even if there are other remaining arguments. Given this inconsistency, and given that sh does not stop execution if a wildcard fails to match, it seems better to allow execution to continue. This is better from a scripting perspective anyway, as it means constructs like `set -l paths foo/*.txt` will actually create the variable (with an empty value) instead of skipping the `set` altogether and perhaps causing subsequent code to read or modify a global or universal variable.
Diffstat (limited to 'parse_execution.h')
-rw-r--r--parse_execution.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse_execution.h b/parse_execution.h
index 36b1cb53..54f889fc 100644
--- a/parse_execution.h
+++ b/parse_execution.h
@@ -100,7 +100,7 @@ private:
parse_execution_result_t run_function_statement(const parse_node_t &header, const parse_node_t &block_end_command);
parse_execution_result_t run_begin_statement(const parse_node_t &header, const parse_node_t &contents);
- parse_execution_result_t determine_arguments(const parse_node_t &parent, wcstring_list_t *out_arguments, const parse_node_t **out_unmatched_wildcard_node);
+ parse_execution_result_t determine_arguments(const parse_node_t &parent, wcstring_list_t *out_arguments);
/* Determines the IO chain. Returns true on success, false on error */
bool determine_io_chain(const parse_node_t &statement, io_chain_t *out_chain);