diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-29 18:18:36 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-29 18:18:36 +0800 |
commit | 63145ea05075725ee8fd8e258aa30ffc57ab0cce (patch) | |
tree | 8d78d0f54280f2cde48b31f737f549ab5c8ff839 | |
parent | 3a7996fb1977982c6410d7efff7b402651c6de6c (diff) | |
download | lua-language-server-63145ea05075725ee8fd8e258aa30ffc57ab0cce.zip |
测试
-rw-r--r-- | server/publish.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/publish.lua b/server/publish.lua index ea55a036..768b9766 100644 --- a/server/publish.lua +++ b/server/publish.lua @@ -9,13 +9,15 @@ local fs = require 'bee.filesystem' local subprocess = require 'bee.subprocess' ROOT = fs.path(rootPath:gsub('[/\\]$', '')) EXTENSION = ROOT:parent_path() -print(ROOT:string(), EXTENSION:string()) require 'utility' local json = require 'json' local function loadPackage() local buf = io.load(EXTENSION / 'package.json') + if not buf then + error(ROOT:string() .. '|' .. EXTENSION:string()) + end local package = json.decode(buf) return package.version end |