summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()