Skip to content

Commit

Permalink
Fixed platform detection on Windows (refs #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Feb 14, 2017
1 parent 74f761f commit 935f71d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions luamods/wolfadmin/util/settings.lua
Expand Up @@ -90,15 +90,14 @@ end

function settings.determineOS()
local system = io.popen("uname -s"):read("*l")

if system == "Linux" or system == "unix" or system == "FreeBSD" or system == "OpenBSD" or system == "NetBSD" or system == "Darwin" or system == "SunOS" or (system and system:match("^CYGWIN")) then
local platform

if system then
platform = "unix"
elseif system and (system:match("^Windows") or system:match("^MINGW")) then
else
platform = "windows"
else -- likely it's unix now
platform = "unix"
end

return platform
end

Expand Down

0 comments on commit 935f71d

Please sign in to comment.