Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit dad75ed

Browse files
authored
fix redundant exit message (#551)
Remove the `exit` event handler which would create duplicate activity events on a crash.
1 parent f94d92a commit dad75ed

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/zinnia.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ const catchChildProcessExit = async ({
163163
const tasks = childProcesses.map(p => (async () => {
164164
try {
165165
await p
166+
onActivity({ type: 'info', message: `${capitalize(module)} exited` })
166167
} catch (err) {
167168
// When the child process crash, attach the module name & the exit reason to the error object
168169
const exitReason = p.exitCode
@@ -294,12 +295,6 @@ export async function run ({
294295
resetTimeout()
295296
process.stderr.write(data)
296297
})
297-
298-
childProcess.on('exit', (code, signal) => {
299-
const exitReason = signal ? `via signal ${signal}` : `with code: ${code}`
300-
const msg = `${capitalize(module)} exited ${exitReason}`
301-
onActivity({ type: 'info', message: msg })
302-
})
303298
}
304299

305300
try {

0 commit comments

Comments
 (0)