blob: a3daa25479d9d43d128413627093e4bbc9ef79f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
local platform = ...
local fs = require 'bee.filesystem'
local sp = require 'bee.subprocess'
local exe = platform == 'msvc' and ".exe" or ""
local CWD = fs.current_path()
local process = assert(sp.spawn {
CWD / 'server' / 'bin' / ('lua-language-server' .. exe),
CWD / 'server' / 'test.lua',
'-E',
stdout = true,
stderr = true,
})
for line in process.stdout:lines 'l' do
print(line)
end
process:wait()
local err = process.stderr:read 'a'
if err ~= '' then
error(err)
end
|