mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 01:14:53 +01:00
CLI: exit with error when load_config returns an error.
For now print a generic error message and exit with error on any non-success code. Previously the code exited, but with exit code zero, leading users / scripts to think the command had succeeded.
This commit is contained in:
parent
112c53535a
commit
dbb5ff3385
2 changed files with 2 additions and 1 deletions
|
@ -584,6 +584,8 @@ main (int argc, char *argv[])
|
|||
case NOTMUCH_STATUS_SUCCESS:
|
||||
break;
|
||||
default:
|
||||
fputs ("Error: unable to load config file.\n", stderr);
|
||||
ret = 1;
|
||||
goto DONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,6 @@ output=$(notmuch config get built_with.nonexistent)
|
|||
test_expect_equal "$output" "false"
|
||||
|
||||
test_begin_subtest "Bad utf8 reported as error"
|
||||
test_subtest_known_broken
|
||||
cp initial-config bad-config
|
||||
printf '[query]\nq3=from:\xff\n' >>bad-config
|
||||
test_expect_code 1 "notmuch --config=./bad-config config list"
|
||||
|
|
Loading…
Reference in a new issue