awful: don't try to spawn nil or empty commands

This commit is contained in:
Lucas de Vries 2008-08-14 00:22:50 +02:00 committed by Julien Danjou
parent 4ea0f659e2
commit 651479f254
1 changed files with 3 additions and 1 deletions

View File

@ -765,7 +765,9 @@ end
-- @param cmd The command.
-- @return The os.execute() return value.
function spawn(cmd)
return os.execute(cmd .. "&")
if cmd and cmd ~= "" then
return os.execute(cmd .. "&")
end
end
--- Eval Lua code.