From ecd7b45d323852af0e79cde1d46d055ae1baa7be Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:06:26 +0100 Subject: [PATCH] fix cwd? --- tests-ui/setup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests-ui/setup.js b/tests-ui/setup.js index 9cb2eb3af..898add828 100644 --- a/tests-ui/setup.js +++ b/tests-ui/setup.js @@ -51,13 +51,16 @@ async function setup() { let python = resolve("../../python_embeded/python.exe"); let args; + let cwd; if (existsSync(python)) { args = ["-s", "ComfyUI/main.py"]; + cwd = "../.."; } else { python = "python"; args = ["main.py"]; + cwd = ".."; } - child = spawn(python, [...args, "--cpu"], { cwd: "../.." }); + child = spawn(python, [...args, "--cpu"], { cwd }); child.on("error", (err) => { console.log(`Server error (${err})`); i = 30;