diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-07-24 10:20:39 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-07-24 10:20:39 +0300 |
commit | 73706a9f4c85beba43b9d781de6a60524c4877a9 (patch) | |
tree | a82edfb0c8b1a725c7c28dfd547d09e2961ea802 | |
parent | 775ed6c39195470da876ab111bf02cc6b790e04e (diff) | |
parent | 0dec9deca56f09ecf8c8e11cbc1a0d9cc3a891e6 (diff) |
Merge pull request #8 from samehkhamis/master
Making things work under windows
-rw-r--r-- | init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -110,7 +110,7 @@ rawset(_G, 'xprint', xlua.print) -- log all session, by replicating stdout to a file ---------------------------------------------------------------------- function xlua.log(file) - os.execute('mkdir -p "' .. sys.dirname(file) .. '"') + os.execute('mkdir ' .. (sys.uname() ~= 'windows' and '-p ' or '') .. ' "' .. sys.dirname(file) .. '"') local f = assert(io.open(file,'w')) io._write = io.write _G._print = _G.print @@ -220,6 +220,7 @@ local formatTime = xlua.formatTime ---------------------------------------------------------------------- do local function getTermLength() + if sys.uname() == 'windows' then return 80 end local tputf = io.popen('tput cols', 'r') local w = tonumber(tputf:read('*a')) local rc = {tputf:close()} |