diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-02-19 17:18:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-02-19 17:18:37 +0800 |
commit | b6e452ccac0cbf150c8ffc4a9738e7e9202fc07c (patch) | |
tree | 6bb06fb1af05b88b26a6d257ca25bdf6977c7edd /script/proto | |
parent | eab7e6d84bd2bd937cf2e27e9da11a3c96c45605 (diff) | |
download | lua-language-server-b6e452ccac0cbf150c8ffc4a9738e7e9202fc07c.zip |
挪到 bee.windows
Diffstat (limited to 'script/proto')
-rw-r--r-- | script/proto/proto.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/script/proto/proto.lua b/script/proto/proto.lua index d01c8f36..2460b4ec 100644 --- a/script/proto/proto.lua +++ b/script/proto/proto.lua @@ -1,5 +1,3 @@ -local subprocess = require 'bee.subprocess' -local socket = require 'bee.socket' local util = require 'utility' local await = require 'await' local pub = require 'pub' @@ -7,7 +5,7 @@ local jsonrpc = require 'jsonrpc' local define = require 'proto.define' local json = require 'json' local inspect = require 'inspect' -local thread = require 'bee.thread' +local platform = require 'bee.platform' local fs = require 'bee.filesystem' local net = require 'service.net' local timer = require 'timer' @@ -234,8 +232,11 @@ end function m.listen(mode, socketPort) m.mode = mode if mode == 'stdio' then - subprocess.filemode(io.stdin, 'b') - subprocess.filemode(io.stdout, 'b') + if platform.OS == 'Windows' then + local windows = require 'bee.windows' + windows.filemode(io.stdin, 'b') + windows.filemode(io.stdout, 'b') + end io.stdin:setvbuf 'no' io.stdout:setvbuf 'no' pub.task('loadProtoByStdio') |