Fix Windows docker invocation for TTS
This commit is contained in:
@@ -12,9 +12,16 @@ async function run(command: string, args: string[], stdio: "ignore" | "inherit"
|
|||||||
const child = spawn(command, args, {
|
const child = spawn(command, args, {
|
||||||
stdio: ["ignore", stdio, "inherit"],
|
stdio: ["ignore", stdio, "inherit"],
|
||||||
windowsHide: true,
|
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) => {
|
child.on("exit", (code) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@@ -13,9 +13,16 @@ async function run(command: string, args: string[], cwd = process.cwd()): Promis
|
|||||||
cwd,
|
cwd,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
windowsHide: true,
|
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) => {
|
child.on("exit", (code) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
Reference in New Issue
Block a user