From 83925f5c7a2de5ffd7db21f620d6864bcf59fd04 Mon Sep 17 00:00:00 2001 From: Ranjith kumar Date: Tue, 24 Dec 2024 17:30:46 +0530 Subject: [PATCH] fix(medusa-cli): fix medusa develop command crashing on file change on windows (#10717) * fix(medusa-cli): fix medusa develop command crashing on file change on windows * chore: update changeset to patch --- .changeset/silent-lies-knock.md | 5 +++++ packages/medusa/src/commands/develop.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/silent-lies-knock.md diff --git a/.changeset/silent-lies-knock.md b/.changeset/silent-lies-knock.md new file mode 100644 index 0000000000000..1c27232340ee4 --- /dev/null +++ b/.changeset/silent-lies-knock.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +Fix medusa develop command crashing on file change on windows diff --git a/packages/medusa/src/commands/develop.ts b/packages/medusa/src/commands/develop.ts index 6cad7bf5eedda..f87b44f652118 100644 --- a/packages/medusa/src/commands/develop.ts +++ b/packages/medusa/src/commands/develop.ts @@ -75,8 +75,9 @@ export default async function ({ types, directory }) { this.childProcess.removeAllListeners() if (process.platform === "win32") { execSync(`taskkill /PID ${this.childProcess.pid} /F /T`) + } else { + this.childProcess.kill("SIGINT") } - this.childProcess.kill("SIGINT") } this.start() },