tool_parsecfg: make warning output propose double-quoting

When the config file parser detects a word that *probably* should be
quoted, mention double-quotes as a possible remedy.

Test 459 verifies.

Proposed-by: Jiehong on github
Fixes #12409
Closes #12412
This commit is contained in:
Daniel Stenberg 2023-11-27 11:36:43 +01:00
parent 1b04dfa371
commit 97ccc4479f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 66 additions and 2 deletions

View file

@ -210,7 +210,8 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
break;
default:
warnf(operation->global, "%s:%d: warning: '%s' uses unquoted "
"whitespace in the line that may cause side-effects",
"whitespace that may cause side-effects. Consider quoting "
"the value with double quotes?",
filename, lineno, option);
}
}