npm run build on Windows with usernames containing space fails, fixed by wrapping tscBin in quotes

This commit is contained in:
Maddy 2021-10-11 18:16:22 +11:00
parent 83332fab42
commit 5d20c6246f

View File

@ -56,7 +56,7 @@ function transpileFiles() {
function util() { function util() {
// const child = spawn("node", `${swcBin} src --out-dir dist --sync`.split(" "), { // const child = spawn("node", `${swcBin} src --out-dir dist --sync`.split(" "), {
const child = spawn("node", `${tscBin} -b .`.split(" "), { const child = spawn("node", `\"${tscBin}\" -b .`.split(" "), {
cwd: path.join(__dirname, "..", "..", "util"), cwd: path.join(__dirname, "..", "..", "util"),
env: process.env, env: process.env,
shell: true, shell: true,