diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 19:05:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 19:05:58 +0800 |
commit | 3f0d26ef525cc81da24d55706fb079fa5a97b56e (patch) | |
tree | 886806e5b151f80271980fed427bfd876b6fb9d3 /make | |
parent | 5ad56c9ccfef9dfbe18a8846d1303b4668077b55 (diff) | |
download | lua-language-server-3f0d26ef525cc81da24d55706fb079fa5a97b56e.zip |
cleanup
Diffstat (limited to 'make')
-rw-r--r-- | make/bootstrap.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/make/bootstrap.lua b/make/bootstrap.lua index 3d2ce465..42de853a 100644 --- a/make/bootstrap.lua +++ b/make/bootstrap.lua @@ -35,7 +35,8 @@ if main then end
end
-local root; do
+local root
+do
if main then
local fs = require 'bee.filesystem'
local mainPath = fs.path(arg[0])
@@ -44,21 +45,21 @@ local root; do root = '.'
end
else
- local sep = package.config:sub(1,1)
+ local sep = package.config:sub(1, 1)
if sep == '\\' then
sep = '/\\'
end
- local pattern = "["..sep.."]+[^"..sep.."]+"
- root = package.cpath:match("([^;]+)"..pattern..pattern.."$")
- arg[0] = root .. package.config:sub(1,1) .. 'main.lua'
+ local pattern = "[" .. sep .. "]+[^" .. sep .. "]+"
+ root = package.cpath:match("([^;]+)" .. pattern .. pattern .. "$")
+ arg[0] = root .. package.config:sub(1, 1) .. 'main.lua'
end
- root = root:gsub('[/\\]', package.config:sub(1,1))
+ root = root:gsub('[/\\]', package.config:sub(1, 1))
end
package.path = table.concat({
root .. "/script/?.lua",
root .. "/script/?/init.lua",
-}, ";"):gsub('/', package.config:sub(1,1))
+}, ";"):gsub('/', package.config:sub(1, 1))
package.searchers[2] = function (name)
local filename, err = package.searchpath(name, package.path)
|