summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/start_service.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-16 10:54:25 +0800
committerruki <[email protected]>2022-04-16 10:54:25 +0800
commitbc28988cf61b1867f34929439f5014a68b123760 (patch)
tree49b1ab59622771b11dd845ee7a852b7b36a18f35 /xmake/modules/private/service/start_service.lua
parent64a9469116255e93808fde7b752ee0a55a94a5df (diff)
improve check env
Diffstat (limited to 'xmake/modules/private/service/start_service.lua')
-rw-r--r--xmake/modules/private/service/start_service.lua17
1 files changed, 3 insertions, 14 deletions
diff --git a/xmake/modules/private/service/start_service.lua b/xmake/modules/private/service/start_service.lua
index 36ba70f1b..f9dd357df 100644
--- a/xmake/modules/private/service/start_service.lua
+++ b/xmake/modules/private/service/start_service.lua
@@ -26,23 +26,12 @@ import("private.service.service")
import("private.service.remote_build.environment")
function main(opt)
- opt = opt or {}
- -- enter a working directory
- local workdir = path.join(os.tmpdir(), "service")
- if not os.isdir(workdir) then
- os.mkdir(workdir)
- os.cd(workdir)
- os.vrunv("xmake", {"create", "-P", "."})
- else
- os.cd(workdir)
- end
- project.chdir(workdir)
-
- -- enter environment
- environment.enter()
+ -- check environment
+ environment.check(true)
-- start service
+ opt = opt or {}
if opt.daemon then
local argv = {"lua"}
if option.get("verbose") then