mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Show swaynag on config errors
This commit is contained in:
parent
3e2bf7f3a5
commit
f9a6407111
6 changed files with 118 additions and 20 deletions
|
|
@ -7,8 +7,19 @@ struct cmd_results *cmd_include(int argc, char **argv) {
|
|||
return error;
|
||||
}
|
||||
|
||||
if (!load_include_configs(argv[0], config)) {
|
||||
return cmd_results_new(CMD_INVALID, "include", "Failed to include sub configuration file: %s", argv[0]);
|
||||
char *errors = NULL;
|
||||
if (!load_include_configs(argv[0], config, &errors)) {
|
||||
struct cmd_results *result = cmd_results_new(CMD_INVALID, "include",
|
||||
"Failed to include sub configuration file: %s", argv[0]);
|
||||
free(errors);
|
||||
return result;
|
||||
}
|
||||
|
||||
if (errors) {
|
||||
struct cmd_results *result = cmd_results_new(CMD_INVALID, "include",
|
||||
"There are errors in the included config\n%s", errors);
|
||||
free(errors);
|
||||
return result;
|
||||
}
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue