[c] Make wordexp fail on undefined variables

This commit is contained in:
Sami Samhuri 2022-01-22 16:29:37 -08:00
parent cd864989ce
commit 32a4f6b894
No known key found for this signature in database
GPG key ID: 4B4195422742FC16

View file

@ -219,7 +219,7 @@ int handle_wordexp_result(int result, char *cmd) {
int process_command(char *line, options_t options) {
wordexp_t words;
int result = wordexp(line, &words, WRDE_SHOWERR);
int result = wordexp(line, &words, WRDE_SHOWERR | WRDE_UNDEF);
if (handle_wordexp_result(result, line) && words.we_wordc > 0) {
if (options->verbose) {
int i;