summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-13 12:19:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-13 12:19:33 +0800
commit11004db9fc51a552107ae6d54fbaef8f37694e2f (patch)
treea9f5756e36e56054c8b01f80f371658a437ec738
parentea14e06ff09bd1ddd574923d0fbd57958ff540b8 (diff)
downloadlua-language-server-11004db9fc51a552107ae6d54fbaef8f37694e2f.zip
跳过不存在的文件
-rw-r--r--server/publish.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/publish.lua b/server/publish.lua
index 5871bbec..76d36472 100644
--- a/server/publish.lua
+++ b/server/publish.lua
@@ -27,7 +27,9 @@ local function copyFiles(out)
local function copy(relative, mode)
local source = EXTENSION / relative
local target = out / relative
- assert(fs.exists(source))
+ if not fs.exists(source) then
+ return
+ end
if fs.is_directory(source) then
fs.create_directory(target)
if mode == true then