main: print error and exit when we fail to find a conf file

This commit is contained in:
Daniel Eklöf 2019-04-29 18:47:21 +02:00
parent d1c958aae0
commit aba597d5cc

4
main.c
View file

@ -140,6 +140,10 @@ main(int argc, const char *const *argv)
}
char *config_path = get_config_path();
if (config_path == NULL) {
LOG_ERR("could not find a configuration (see man 5 f00bar)");
return 1;
}
struct bar *bar = load_bar(config_path);
free(config_path);