fix(medusa-cli): allow spaces in develop command (#1430)

This commit is contained in:
Philip Korsholm authored and GitHub committed 2022-05-04 08:44:37 +02:00
1 parent ae5801c518
commit 2260c2d09e
1 file changed
+3 -2
+3 -2
View File
@@ -12,7 +12,8 @@ export default async function({ port, directory }) {
args.shift() args.shift()
const babelPath = path.join(directory, "node_modules", ".bin", "babel") const babelPath = path.join(directory, "node_modules", ".bin", "babel")
execSync(`${babelPath} src -d dist`, {
execSync(`"${babelPath}" src -d dist`, {
cwd: directory, cwd: directory,
stdio: ["ignore", process.stdout, process.stderr], stdio: ["ignore", process.stdout, process.stderr],
}) })
@@ -24,7 +25,7 @@ export default async function({ port, directory }) {
stdio: ["pipe", process.stdout, process.stderr], stdio: ["pipe", process.stdout, process.stderr],
}) })
chokidar.watch(`${directory}/src`).on("change", file => { chokidar.watch(`${directory}/src`).on("change", (file) => {
const f = file.split("src")[1] const f = file.split("src")[1]
Logger.info(`${f} changed: restarting...`) Logger.info(`${f} changed: restarting...`)
child.kill("SIGINT") child.kill("SIGINT")