From a0c60edcad88cc65ba88a87757126b3ae0bc3e8d Mon Sep 17 00:00:00 2001 From: Soumith Chintala Date: Sat, 10 Sep 2016 12:59:31 -0400 Subject: fixing sys to not fork for figuring out sys.OS --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 3911ce4..bb5faf9 100644 --- a/init.lua +++ b/init.lua @@ -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 '?' -- cgit v1.2.3