diff options
-rw-r--r-- | init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,13 +50,13 @@ sys.execute = execute function sys.fexecute(cmd, readwhat) readwhat = readwhat or '*all' local tmpfile = os.tmpname() - local cmd = cmd .. ' 1>'.. tmpfile..' 2>' .. tmpfile + local cmd = cmd .. ' >'.. tmpfile..' 2>&1' os.execute(cmd) local file = _G.assert(io.open(tmpfile)) local s= file:read(readwhat) file:close() s = s:gsub('^%s*',''):gsub('%s*$','') - os.execute('rm ' .. tmpfile) + os.remove(tmpfile) return s end |