$ hg config extension.i_dont_exist $ echo $? 0 Should really exit other than 0 when the config option does not exist. What it currently does is return a newline for extensions that exist (and the option doesn't have anything on the right hand side of the =).
Sounds good.
Fixed by http://selenic.com/repo/hg/rev/816be4ca4ae2 Aaron Kushner <akushner@fb.com> config: exit non zero on non-existent config option (issue4247) When running 'hg config no_such_option', hg exited with a zero exit code. This change now exits with a 1 if the config option does not exist. (please test the fix)