You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into edge case while working on Vitest. Unfortunately I was unable to create minimal reproduction. Reproduction with Vitest: AriPerkkio/vitest@de3dc71
When we add exit listener that calls process.exit inside it, Tinyexec loses stdout from that process. This is similar exit handling as tinylibs/picospinner does.
It seems that subprocess.stdout returned from node:child_process.spawn is closed when subprocess.stderr is read. Here's some logging from Vitest's case:
I ran into edge case while working on Vitest. Unfortunately I was unable to create minimal reproduction. Reproduction with Vitest: AriPerkkio/vitest@de3dc71
When we add
exit
listener that callsprocess.exit
inside it, Tinyexec losesstdout
from that process. This is similar exit handling astinylibs/picospinner
does.It seems that
subprocess.stdout
returned fromnode:child_process.spawn
is closed whensubprocess.stderr
is read. Here's some logging from Vitest's case:tinyexec/src/main.ts
Lines 216 to 226 in 24e9861
To fix these, we'll need to first read
stdout
.Replacing
tinyexec
withnode:child_process.execSync
works 100% times.The text was updated successfully, but these errors were encountered: