diff options
author | xl000 <l_xb@foxmail.com> | 2019-04-17 01:47:52 +0800 |
---|---|---|
committer | xl000 <l_xb@foxmail.com> | 2019-04-17 01:47:52 +0800 |
commit | 613db1b0a66872f7907651072ed4498420d7aa63 (patch) | |
tree | f053cdb83b01ae7c91b1a3df22d4a2eab339786f /server/publish.lua | |
parent | 0879a937cc317499e1c0358d82badae10d0c5c28 (diff) | |
download | lua-language-server-613db1b0a66872f7907651072ed4498420d7aa63.zip |
subprocess.spawn带上exe扩展名
Diffstat (limited to 'server/publish.lua')
-rw-r--r-- | server/publish.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/publish.lua b/server/publish.lua index c7cbefcc..f85487e4 100644 --- a/server/publish.lua +++ b/server/publish.lua @@ -63,7 +63,9 @@ local function copyFiles(root, out) end 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, |