]> git.lizzy.rs Git - bspwm.git/commitdiff
Fail when no command is provided
authorBastien Dejean <nihilhill@gmail.com>
Tue, 5 Nov 2013 21:13:25 +0000 (22:13 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Tue, 5 Nov 2013 21:13:25 +0000 (22:13 +0100)
contrib/rules/rulc

index 339954a3bc95126067c6f0a3884680481a39c579..f0cd6335d248194459076394ad83ea17fc7b3ff1 100755 (executable)
@@ -39,6 +39,10 @@ for opt, optarg, optind, longind in p.getopt(arg, short, long) do
     data_idx = optind
 end
 
+if not cmd then
+    os.exit(1)
+end
+
 local msg = cmd
 if cmd == "test" then
     msg = string.format("%s {class=%q, instance=%q, title=%q, type=%q, state=%q}", msg, arg[data_idx], arg[data_idx+1], arg[data_idx+2], arg[data_idx+3], arg[data_idx+4])