From f5dc677df830203ec78c7c2917c090b340894496 Mon Sep 17 00:00:00 2001 From: Ryuu Mitsuki Date: Thu, 16 May 2024 20:04:35 +0700 Subject: [PATCH] fix(build): Resolve bad shell invocation shell Before, during the building procedure, there was a problem with the invocation shell in the child process that used `child_process.spawn`. In Windows, this resulted in the process issuing an ENOENT error since the command was not recognized. However, with this modification, we resolved the issue and it now functions correctly in Windows by activating the `shell` option within the options argument (3rd argument) of the `spawn` function. Note: Tested in PowerShell and MSYS2 MinTTY. This change are exclusively to Windows users and developers. --- scripts/build.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.ts b/scripts/build.ts index ba641f6..7229ecc 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -121,6 +121,7 @@ async function minify(files: Array): Promise { const tsc: ChildProcess = spawn(tscCmd[0], tscCmd.slice(1), { cwd: rootDir, stdio: 'inherit', + shell: true, windowsHide: true });