summaryrefslogtreecommitdiff
path: root/make/bootstrap.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-23 23:46:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-23 23:46:53 +0800
commit3cadbfc7419542a8b56f0996bfbfbda146a30ea5 (patch)
tree216f4c4afff1240c84b395901bf7a7b0a9f78239 /make/bootstrap.lua
parent0652fa586d62408e28d8f7d253aa96381d357bc8 (diff)
downloadlua-language-server-3cadbfc7419542a8b56f0996bfbfbda146a30ea5.zip
fix infer of `unknown and unknown`
Diffstat (limited to 'make/bootstrap.lua')
-rw-r--r--make/bootstrap.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/make/bootstrap.lua b/make/bootstrap.lua
index 6c27cf95..00036f34 100644
--- a/make/bootstrap.lua
+++ b/make/bootstrap.lua
@@ -69,6 +69,9 @@ package.searchers[2] = function (name)
return err
end
local f = io.open(filename)
+ if not f then
+ return 'cannot open file:' .. filename
+ end
local buf = f:read '*a'
f:close()
local relative = filename:sub(1, #root) == root and filename:sub(#root + 2) or filename