Fix Windows docker invocation for TTS

This commit is contained in:
2026-05-03 01:57:59 +09:00
parent ad357a6ede
commit c328ef517e
2 changed files with 16 additions and 2 deletions

View File

@@ -12,9 +12,16 @@ async function run(command: string, args: string[], stdio: "ignore" | "inherit"
const child = spawn(command, args, {
stdio: ["ignore", stdio, "inherit"],
windowsHide: true,
shell: process.platform === "win32",
});
child.on("error", reject);
child.on("error", (error) => {
if ((error as NodeJS.ErrnoException).code === "ENOENT" && command === "docker") {
reject(new Error("Docker를 찾지 못했습니다. Docker Desktop을 설치하고 실행한 뒤 다시 시도하세요."));
return;
}
reject(error);
});
child.on("exit", (code) => {
if (code === 0) {
resolve();