Start Comfy without a visible command prompt on the desktop.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -226,12 +226,18 @@ async function processRunning() {
|
||||
|
||||
function spawnLaunchCommand(command: string) {
|
||||
log('spawn', { command: command.slice(0, 180) })
|
||||
const child = spawn(command, {
|
||||
shell: true,
|
||||
detached: true,
|
||||
stdio: 'ignore',
|
||||
windowsHide: true
|
||||
})
|
||||
const win = process.platform === 'win32'
|
||||
const exe = win
|
||||
? command.match(/start\s+""\s+"([^"]+)"/i)?.[1] || command.match(/^"([^"]+\.exe)"\s*$/i)?.[1]
|
||||
: ''
|
||||
const child = exe
|
||||
? spawn(exe, [], { detached: true, stdio: 'ignore', windowsHide: true })
|
||||
: spawn(command, {
|
||||
shell: true,
|
||||
detached: !win,
|
||||
stdio: 'ignore',
|
||||
windowsHide: true
|
||||
})
|
||||
child.unref()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user