fix: no console output after updating on mac

Massimo Melina committed May 3, 2023 at 00:17 UTC e4d944889bfb3c905ad8f5fabe593d53208700ac
1 file changed +2 -2
src/update.ts
+2 -2
@@ -49,7 +49,7 @@ export async function update() {
49 catch {}
50 renameSync(bin, oldBin)
51 console.log("launching new version in background", newBinFile)
52 - spawn(newBin, ['--updating', binFile], { detached: true, shell: true })
52 + spawn(newBin, ['--updating', binFile], { detached: true, shell: true, stdio:'inherit' })
53 .on('error', console.error)
54 })
55 console.log('quitting')
@@ -67,7 +67,7 @@ if (argv.updating) { // we were launched with a temporary name, restore original
67 console.log("renamed binary file to", argv.updating)
68 // have to relaunch with new name, or otherwise next update will fail with EBUSY on hfs.exe
69 onProcessExit(() => {
70 - spawn(dest, [], { detached: true, shell: true })
70 + spawn(dest, [], { detached: true, shell: true, stdio:'inherit' })
71 .on('error', console.error)
72 })
73 console.log('restarting')