Skip to content
Snippets Groups Projects
Commit 7d1c0016 authored by 最萌小汐's avatar 最萌小汐
Browse files

#335 change the arg to `--logpath=xxx`

parent 0e14b83e
Branches
No related tags found
No related merge requests found
# changelog
## 1.8.3
* `NEW` specify path of `log` and `meta` by `LOGPATH="xxx"` and `METAPATH="XXX"` in command line
* `CHG` got arg after script name: `lua-language-server.exe main.lua LANG="zhCN" LOGPATH="/log"`
* `NEW` specify path of `log` and `meta` by `--logpath=xxx` and `--metapath=XXX` in command line
* `CHG` got arg after script name: `lua-language-server.exe main.lua --logpath=D:\log --metapath=D:\meta --develop=false`
* `FIX` runtime errors
## 1.8.2
......
......@@ -6,7 +6,7 @@ ROOT = fs.path(rootPath)
local function loadArgs()
for _, v in ipairs(arg) do
local key, value = v:match '([%w_]+)%=(.+)'
local key, value = v:match '^%-%-([%w_]+)%=(.+)'
if value == 'true' then
value = true
elseif value == 'false' then
......@@ -14,7 +14,7 @@ local function loadArgs()
elseif tonumber(value) then
value = tonumber(value)
end
_G[key] = value
_G[key:upper()] = value
end
end
......
......@@ -168,10 +168,6 @@ local function compileMetaDoc()
version = version,
language = langID,
})
fs.create_directories(metapath:parent_path())
if fs.exists(metapath) then
--return
end
local metaLang = loadMetaLocale('en-US')
if langID ~= 'en-US' then
......@@ -181,7 +177,7 @@ local function compileMetaDoc()
m.metaPath = metapath:string()
m.metaPaths = {}
fs.create_directory(metapath)
fs.create_directories(metapath)
local templateDir = ROOT / 'meta' / 'template'
for fullpath in templateDir:list_directory() do
local filename = fullpath:filename()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment