Skip to content

Commit ed38492

Browse files
committed
fix: spawn whisper with raw path and shell:false
1 parent e162f3d commit ed38492

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

vite.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,12 @@ function comfyLauncher(): Plugin {
10671067
)
10681068

10691069
// Use async spawn instead of execSync to avoid blocking the server
1070+
// For spawn without shell, we need the raw unquoted path
1071+
const rawPythonPath = pythonBin.replace(/^"|"$/g, '')
10701072
const runWhisper = (scriptPath: string, timeoutMs: number): Promise<string> => {
10711073
return new Promise((resolve, reject) => {
1072-
const proc = spawn(pythonBin, [scriptPath], {
1073-
shell: true,
1074+
const proc = spawn(rawPythonPath, [scriptPath], {
1075+
shell: false,
10741076
stdio: ['ignore', 'pipe', 'pipe'],
10751077
})
10761078
let stdout = ''

0 commit comments

Comments
 (0)