Skip to content

Commit f7d4b6d

Browse files
committed
add more tips
1 parent 67e8cf9 commit f7d4b6d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

xmake/modules/private/service/distcc_build/server_session.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ end
189189

190190
-- get work directory
191191
function server_session:workdir()
192-
return path.join(self:server():workdir(), "sessons", self:id())
192+
return path.join(self:server():workdir(), "sessions", self:id())
193193
end
194194

195195
-- get build directory

xmake/modules/private/service/remote_build/client.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--
2020

2121
-- imports
22+
import("core.base.tty")
2223
import("core.base.bytes")
2324
import("core.base.base64")
2425
import("core.base.socket")
@@ -491,7 +492,13 @@ end
491492

492493
-- read stdin data
493494
function remote_build_client:_read_stdin(stream, opt)
495+
local term = tty.term()
496+
if term == "msys2" or term == "cygwin" then
497+
wprint("we cannot capture stdin on %s, please pass `-y` option to xmake command or use cmd/powershell terminal!", term)
498+
end
494499
while not opt.stop do
500+
-- FIXME, io.readable is invalid on msys2/cygwin, it always return false
501+
-- @see https://github.com/xmake-io/xmake/issues/2504
495502
if io.readable() then
496503
local line = io.read("L") -- with crlf
497504
if line and #line > 0 then
@@ -511,7 +518,7 @@ function remote_build_client:_read_stdin(stream, opt)
511518
end
512519
end
513520
-- say bye
514-
if stream:send_msg(message.new_end({token = self:token()})) then
521+
if stream:send_msg(message.new_end(self:session_id(), {token = self:token()})) then
515522
stream:flush()
516523
end
517524
end

xmake/modules/private/service/remote_build/server_session.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ end
224224

225225
-- get work directory
226226
function server_session:workdir()
227-
return path.join(self:server():workdir(), "sessons", self:id())
227+
return path.join(self:server():workdir(), "sessions", self:id())
228228
end
229229

230230
-- is connected?

xmake/modules/private/service/remote_cache/server_session.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ end
174174

175175
-- get work directory
176176
function server_session:workdir()
177-
return path.join(self:server():workdir(), "sessons", self:id())
177+
return path.join(self:server():workdir(), "sessions", self:id())
178178
end
179179

180180
-- is connected?

0 commit comments

Comments
 (0)