commit 71ebe8c36be6c702654ad550aa2e897d03b4e98f
parent 71bcee4f96206e9988bc9a1302f6e1fff4526ce3
Author: S. Christoffer Eliesen <christoffer@eliesen.no>
Date: Sun, 18 Oct 2015 19:14:49 +0200
commands: Catch empty exec with --no-startup-id cases.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/sway/commands.c b/sway/commands.c
@@ -190,6 +190,11 @@ static enum cmd_status cmd_exec_always(int argc, char **argv) {
char *tmp = NULL;
if (strcmp((char*)*argv, "--no-startup-id") == 0) {
sway_log(L_INFO, "exec switch '--no-startup-id' not supported, ignored.");
+
+ if (!checkarg(argc - 1, "exec_always", EXPECTED_MORE_THAN, 0)) {
+ return CMD_FAILURE;
+ }
+
tmp = join_args(argv + 1, argc - 1);
} else {
tmp = join_args(argv, argc);