summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-30 16:18:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-30 16:18:27 +0800
commit89c11e8719fa36f6e08904b488ffa792bcb04477 (patch)
tree89604a679afe9e86c07bf9a865a7981f89d256b9
parent7d1c0016967bd05ab537876f24ebfccad8fdf591 (diff)
downloadlua-language-server-89c11e8719fa36f6e08904b488ffa792bcb04477.zip
clean up code
-rw-r--r--main.lua3
-rw-r--r--test.lua1
2 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index ec979f16..9fd1794d 100644
--- a/main.lua
+++ b/main.lua
@@ -13,6 +13,8 @@ local function loadArgs()
value = false
elseif tonumber(value) then
value = tonumber(value)
+ elseif value:sub(1, 1) == '"' and value:sub(-1, -1) == '"' then
+ value = value:sub(2, -2)
end
_G[key:upper()] = value
end
@@ -20,7 +22,6 @@ end
loadArgs()
-LANG = LANG or 'en-US'
LOGPATH = LOGPATH or (ROOT:string() .. '/log')
METAPATH = METAPATH or (ROOT:string() .. '/meta')
diff --git a/test.lua b/test.lua
index 22a2eab9..6116c16a 100644
--- a/test.lua
+++ b/test.lua
@@ -7,7 +7,6 @@ package.path = package.path
.. ';' .. rootPath .. '/test/?/init.lua'
local fs = require 'bee.filesystem'
ROOT = fs.path(rootPath)
-LANG = 'zh-CN'
TEST = true
DEVELOP = true
LOGPATH = LOGPATH or (ROOT .. '/log')