summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index cde56b4..0c5c6cb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -935,14 +935,18 @@ static void parse_args(struct tofi *tofi, int argc, char *argv[])
opt = getopt_long(argc, argv, short_options, long_options, &option_index);
while (opt != -1) {
if (opt == 0) {
- config_apply(tofi, long_options[option_index].name, optarg);
+ if (!config_apply(tofi, long_options[option_index].name, optarg)) {
+ exit(EXIT_FAILURE);
+ }
} else if (opt == 'k') {
/*
* Backwards compatibility for --late-keyboard-init not
* taking an argument.
*/
if (optarg) {
- config_apply(tofi, long_options[option_index].name, optarg);
+ if (!config_apply(tofi, long_options[option_index].name, optarg)) {
+ exit(EXIT_FAILURE);
+ }
} else {
tofi->late_keyboard_init = true;
}