summaryrefslogtreecommitdiff
path: root/make/detect_platform.lua
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2024-02-26 11:17:59 +0800
committeractboy168 <actboy168@gmail.com>2024-02-26 11:17:59 +0800
commitab34c3f920a5a20a284e67ebbc3dc53df89e00f6 (patch)
tree461921d4ad722ffddae12b2b4229fc450ddc51d4 /make/detect_platform.lua
parentfec4e41cc15e689d62f1fee50295abca4e72056e (diff)
downloadlua-language-server-ab34c3f920a5a20a284e67ebbc3dc53df89e00f6.zip
platform.OS -> platform.os
Diffstat (limited to 'make/detect_platform.lua')
-rw-r--r--make/detect_platform.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/make/detect_platform.lua b/make/detect_platform.lua
index 52207f95..4b62298f 100644
--- a/make/detect_platform.lua
+++ b/make/detect_platform.lua
@@ -2,7 +2,7 @@ local lm = require 'luamake'
local platform = require 'bee.platform'
-if platform.OS == 'macOS' then
+if platform.os == 'macos' then
if lm.platform == nil then
elseif lm.platform == "darwin-arm64" then
lm.target = "arm64-apple-macos11"
@@ -11,7 +11,7 @@ if platform.OS == 'macOS' then
else
error "unknown platform"
end
-elseif platform.OS == 'Windows' then
+elseif platform.os == 'windows' then
if lm.platform == nil then
elseif lm.platform == "win32-ia32" then
lm.arch = "x86"
@@ -20,7 +20,7 @@ elseif platform.OS == 'Windows' then
else
error "unknown platform"
end
-elseif platform.OS == 'Linux' then
+elseif platform.os == 'linux' then
if lm.platform == nil then
elseif lm.platform == "linux-x64" then
elseif lm.platform == "linux-arm64" then
@@ -52,7 +52,7 @@ local ARCH <const> = {
}
local function detectArch()
- if platform.OS == 'Windows' then
+ if platform.os == 'windows' then
return detectWindowsArch()
end
local posixArch = detectPosixArch()
@@ -67,5 +67,5 @@ local function targetPlatformArch()
end
if not lm.notest then
- lm.notest = (platform.OS ~= 'Windows' and targetPlatformArch() ~= detectArch())
+ lm.notest = (platform.os ~= 'windows' and targetPlatformArch() ~= detectArch())
end