summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-07 11:16:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-07 11:16:42 +0800
commit35b092a27b35a671816db18af6bfb2ac6a174d0e (patch)
tree4e3de45b39eb483f2dc7a5f8d403db143e6c4a65
parent837b13984c4391afcc41f817b8afe31528173982 (diff)
downloadlua-language-server-35b092a27b35a671816db18af6bfb2ac6a174d0e.zip
fix #345
-rw-r--r--changelog.md1
-rw-r--r--main.lua4
2 files changed, 5 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index d27fde87..59fd50d2 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,7 @@
# changelog
## 1.11.2
+* `FIX` [#345](https://github.com/sumneko/lua-language-server/issues/345): not works with unexpect args
* `FIX` [#346](https://github.com/sumneko/lua-language-server/issues/346): dont modify the cache
## 1.11.1
diff --git a/main.lua b/main.lua
index 9bbd8a1f..1b0c7a5a 100644
--- a/main.lua
+++ b/main.lua
@@ -18,6 +18,9 @@ end
local function loadArgs()
for _, v in ipairs(arg) do
local key, value = v:match '^%-%-([%w_]+)%=(.+)'
+ if not key then
+ goto CONTINUE
+ end
if value == 'true' then
value = true
elseif value == 'false' then
@@ -28,6 +31,7 @@ local function loadArgs()
value = value:sub(2, -2)
end
_G[key:upper()] = value
+ ::CONTINUE::
end
end