From 5bf998bb35a3de5a80c0c9c0e92f94f63f8ad360 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 14 Sep 2023 22:45:12 +0800 Subject: switch to xmakesrc --- xmake/modules/private/service/remote_build/server_session.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xmake/modules/private/service/remote_build/server_session.lua b/xmake/modules/private/service/remote_build/server_session.lua index fb238f584..eca4fc0e5 100644 --- a/xmake/modules/private/service/remote_build/server_session.lua +++ b/xmake/modules/private/service/remote_build/server_session.lua @@ -250,7 +250,12 @@ function server_session:runcmd(respmsg) end) -- run program - os.execv(program, argv, {curdir = self:sourcedir(), stdout = stdout_wpipe, stdin = stdin_rpipe, envs = {XMAKE_IN_SERVICE = "true"}}) + local xmakesrc + if os.isfile(path.join(self:xmake_sourcedir(), "core", "main.lua")) then + xmakesrc = self:xmake_sourcedir() + end + os.execv(program, argv, {curdir = self:sourcedir(), stdout = stdout_wpipe, stdin = stdin_rpipe, + envs = {XMAKE_IN_SERVICE = "true", XMAKE_PROGRAM_DIR = xmakesrc}}) stdin_rpipe:close() stdout_wpipe:close() -- cgit v1.3.1