diff options
Diffstat (limited to 'core/init.lua')
-rw-r--r-- | core/init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/init.lua b/core/init.lua index 9b47de12..5724c908 100644 --- a/core/init.lua +++ b/core/init.lua @@ -21,11 +21,11 @@ if CURSES and WIN32 then function os.spawn(argv, ...) local current_dir = lfs.currentdir() local i = 1 - if type(select(i, ...)) == 'string' then + if type(select(i, ...) or nil) == 'string' then lfs.chdir(select(i, ...)) -- cwd i = i + 1 end - if type(select(i, ...)) == 'table' then i = i + 1 end -- env (ignore) + if type(select(i, ...) or nil) == 'table' then i = i + 1 end -- env (ignore) local p = io.popen(argv..' 2>&1') if select(i, ...) then select(i, ...)(p:read('a')) end -- stdout_cb local status = select(3, p:close()) |