diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-03-09 20:22:40 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-03-09 20:22:40 +0800 |
commit | cac06e55dbda2b077fabc9413e64e30a6ea164f9 (patch) | |
tree | 8350176c5017e93cf2af37bc11608d4420eee649 | |
parent | af57f89ebbfd7987c77e66dbea2599720c102ae5 (diff) | |
download | lua-language-server-cac06e55dbda2b077fabc9413e64e30a6ea164f9.zip |
fix #1955
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | main.lua | 3 | ||||
-rw-r--r-- | script/cli/check.lua | 8 |
3 files changed, 10 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index 6b86db9b..fc8bc33a 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ * `FIX` [#1924] * `FIX` [#1928] * `FIX` [#1945] +* `FIX` [#1955] * `FIX` [#1978] [#1715]: https://github.com/LuaLS/lua-language-server/issues/1715 @@ -18,6 +19,7 @@ [#1924]: https://github.com/LuaLS/lua-language-server/issues/1924 [#1928]: https://github.com/LuaLS/lua-language-server/issues/1928 [#1945]: https://github.com/LuaLS/lua-language-server/issues/1945 +[#1955]: https://github.com/LuaLS/lua-language-server/issues/1955 [#1978]: https://github.com/LuaLS/lua-language-server/issues/1978 ## 3.6.13 @@ -70,10 +70,11 @@ log.info('METAPATH:', METAPATH) log.info('VERSION:', version.getVersion()) require 'tracy' -require 'cli' xpcall(dofile, log.debug, (ROOT / 'debugger.lua'):string()) +require 'cli' + local _, service = xpcall(require, log.error, 'service') service.start() diff --git a/script/cli/check.lua b/script/cli/check.lua index 37b6ad15..ea767fae 100644 --- a/script/cli/check.lua +++ b/script/cli/check.lua @@ -8,6 +8,9 @@ local jsonb = require 'json-beautify' local lang = require 'language' local define = require 'proto.define' local config = require 'config.config' +local fs = require 'bee.filesystem' + +require 'vm' lang(LOCALE) @@ -16,9 +19,10 @@ if type(CHECK) ~= 'string' then return end -local rootUri = furi.encode(CHECK) +local rootPath = fs.absolute(fs.path(CHECK)):string() +local rootUri = furi.encode(rootPath) if not rootUri then - print(lang.script('CLI_CHECK_ERROR_URI', CHECK)) + print(lang.script('CLI_CHECK_ERROR_URI', rootPath)) return end |