diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-10-11 19:49:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-10-11 19:49:04 +0800 |
commit | c7937d65b7830412b809e5dcbad72f44a9f0110e (patch) | |
tree | cba0ae50e988f61ea9fa40e8e39c526b04b41bb2 /make/bootstrap.lua | |
parent | c14c7a79abe3c8dc512c2faa4a6501878618ebc6 (diff) | |
download | lua-language-server-c7937d65b7830412b809e5dcbad72f44a9f0110e.zip |
no need to specify entry script
Diffstat (limited to 'make/bootstrap.lua')
-rw-r--r-- | make/bootstrap.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/make/bootstrap.lua b/make/bootstrap.lua index 77f1a4d0..42e34890 100644 --- a/make/bootstrap.lua +++ b/make/bootstrap.lua @@ -11,10 +11,6 @@ while true do i = i + 1
end
-if arg[i] == nil then
- return
-end
-
for j = -1, #arg do
arg[j - i] = arg[j]
end
@@ -38,4 +34,6 @@ package.path = table.concat({ root .. "/script/?.lua",
root .. "/script/?/init.lua",
}, ";")
-assert(loadfile(arg[0]))(table.unpack(arg))
+
+local main = arg[0] or 'main.lua'
+assert(loadfile(main))(table.unpack(arg))
|