summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-14 22:45:12 +0800
committerruki <[email protected]>2023-09-14 22:45:12 +0800
commit5bf998bb35a3de5a80c0c9c0e92f94f63f8ad360 (patch)
tree9421aabb300e85a1ccbfbc3fb20a5524c434aeb1
parent57acbb677cda24e7bab0e8bac2dc8ec01a18c709 (diff)
switch to xmakesrc
-rw-r--r--xmake/modules/private/service/remote_build/server_session.lua7
1 files changed, 6 insertions, 1 deletions
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()