diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-09-10 19:59:31 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2016-09-10 19:59:31 +0300 |
commit | a0c60edcad88cc65ba88a87757126b3ae0bc3e8d (patch) | |
tree | 0e336022f3ee14aa98548c25d6dc9ff3f0e68ff5 | |
parent | 6de204cc2254234f8c1caa418ac36d75ee3b0488 (diff) |
fixing sys to not fork for figuring out sys.OS
-rw-r--r-- | init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -69,10 +69,11 @@ function sys.uname() if paths.dirp('C:\\') then return 'windows' else - local os = execute('uname -a') + local ffi = require 'ffi' + local os = ffi.os if os:find('Linux') then return 'linux' - elseif os:find('Darwin') then + elseif os:find('OSX') then return 'macos' else return '?' |