changeset 39 | 237af42156a1 |
parent 3 | 508108deee63 |
child 66 | d9c00a9fe9d5 |
--- a/mcbot/libs/shcmd.lua Mon Apr 19 10:20:28 2010 +0200 +++ b/mcbot/libs/shcmd.lua Sat Apr 24 10:45:00 2010 +0200 @@ -6,6 +6,7 @@ local fh = io.popen(fullcmd) result = fh:read("*a") -- read cmd output fh:close() + if not result then return nil end -- Trim trailing newlines local r = result:gsub("\n+$", "") return r