summaryrefslogtreecommitdiffstats
path: root/sway/commands/include.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/include.c')
-rw-r--r--sway/commands/include.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sway/commands/include.c b/sway/commands/include.c
index 1ba9a10d..72fec7cc 100644
--- a/sway/commands/include.c
+++ b/sway/commands/include.c
@@ -7,8 +7,19 @@ struct cmd_results *cmd_include(int argc, char **argv) {
7 return error; 7 return error;
8 } 8 }
9 9
10 if (!load_include_configs(argv[0], config)) { 10 char *errors = NULL;
11 return cmd_results_new(CMD_INVALID, "include", "Failed to include sub configuration file: %s", argv[0]); 11 if (!load_include_configs(argv[0], config, &errors)) {
12 struct cmd_results *result = cmd_results_new(CMD_INVALID, "include",
13 "Failed to include sub configuration file: %s", argv[0]);
14 free(errors);
15 return result;
16 }
17
18 if (errors) {
19 struct cmd_results *result = cmd_results_new(CMD_INVALID, "include",
20 "There are errors in the included config\n%s", errors);
21 free(errors);
22 return result;
12 } 23 }
13 24
14 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 25 return cmd_results_new(CMD_SUCCESS, NULL, NULL);