summaryrefslogtreecommitdiff
path: root/server/test.lua
diff options
context:
space:
mode:
authorxl000 <l_xb@foxmail.com>2019-04-17 01:47:52 +0800
committerxl000 <l_xb@foxmail.com>2019-04-17 01:47:52 +0800
commit613db1b0a66872f7907651072ed4498420d7aa63 (patch)
treef053cdb83b01ae7c91b1a3df22d4a2eab339786f /server/test.lua
parent0879a937cc317499e1c0358d82badae10d0c5c28 (diff)
downloadlua-language-server-613db1b0a66872f7907651072ed4498420d7aa63.zip
subprocess.spawn带上exe扩展名
Diffstat (limited to 'server/test.lua')
-rw-r--r--server/test.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/test.lua b/server/test.lua
index fe2efd23..d39edda4 100644
--- a/server/test.lua
+++ b/server/test.lua
@@ -6,7 +6,9 @@ package.path = (ROOT / 'src' / '?.lua'):string()
.. ';' .. (ROOT / 'src' / '?' / 'init.lua'):string()
local function runTest(root)
- local exe = root / 'bin' / 'lua-language-server'
+ local is_macos = package.cpath:sub(-3) == '.so'
+ local ext = is_macos and '' or '.exe'
+ local exe = root / 'bin' / 'lua-language-server' .. ext
local test = root / 'test' / 'main.lua'
local lua = subprocess.spawn {
exe,