Better debug & warning output re: wordexp() shell expansion
This commit is contained in:
parent
fe33acc716
commit
65f3c805d1
1 changed files with 2 additions and 2 deletions
|
|
@ -27756,13 +27756,13 @@ static void parse_file_options(struct cfginfo *restrict tmpcfg, const char *file
|
||||||
wordexp(arg, &result, 0);
|
wordexp(arg, &result, 0);
|
||||||
if (result.we_wordv != NULL)
|
if (result.we_wordv != NULL)
|
||||||
{
|
{
|
||||||
DEBUG_PRINTF("wordexp result.we_wordv of `%s` was `%s`\n", str, result.we_wordv[0]);
|
DEBUG_PRINTF("wordexp result.we_wordv of '%s' was '%s'\n", str, result.we_wordv[0]);
|
||||||
arg = strdup(result.we_wordv[0]);
|
arg = strdup(result.we_wordv[0]);
|
||||||
wordfree(&result);
|
wordfree(&result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Shell expansion of `%s` failed! (You probably need to wrap it in quotes (\")!)\n", str);
|
fprintf(stderr, "Shell expansion of '%s' on line %d of '%s' failed! (You probably need to wrap it in quotes (\")!)\n", str, line, filename);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue