From 54374d81b560d572fef5b1e5a38704349f31998e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 10 Aug 2015 15:45:36 -0400 Subject: [PATCH] Fix some errors with config loading --- sway/commands.c | 3 +++ sway/main.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sway/commands.c b/sway/commands.c index 0f5f92865..3f9cc73fc 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -368,5 +368,8 @@ int handle_command(struct sway_config *config, char *exec) { free(argv[i]); } free(argv); + if (ret != 0) { + sway_log(L_ERROR, "Command failed: %s", cmd); + } return ret; } diff --git a/sway/main.c b/sway/main.c index 900e6e5dc..af8c6ed13 100644 --- a/sway/main.c +++ b/sway/main.c @@ -43,8 +43,8 @@ int main(int argc, char **argv) { } setenv("DISPLAY", ":1", 1); - if (load_config()) { - exit(1); + if (!load_config()) { + sway_abort("Unable to load config"); } wlc_run();