namsral/flag

Config file parse failure "configuration variable provided but not defined" is not visible to application

nvx opened this issue · 2 comments

nvx commented

When an invalid command line argument is passes, usage information is printed and the application exists by default as per the default ErrorHandling option along with the message "flag provided but not defined: ".

When doing the same thing with a config file passed in via -config however, a similar error is printed "configuration variable provided but not defined", but the application does not exit, nor does there appear to be any way to detect this error within the application either.

Yes, this needs to be fixed.

Undefined variables should be handled in configuration files and in prefixed environment variables.

Commit #b5bfd14 should fix the issue.