Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Aug 21, 2023
1 parent 6e05452 commit 1df29f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/zinnia.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ export async function run ({
}
})

childProcess.on('exit', (code, signal) => {
const reason = signal ? `via signal ${signal}` : `with code: ${code}`
const msg = `Zinnia exited ${reason}`
onActivity({ type: 'info', message: msg })
})

const readyPromise = new Promise((resolve, reject) => {
childProcess.stdout.setEncoding('utf-8')
childProcess.stdout.on('data', data => {
Expand All @@ -79,6 +73,12 @@ export async function run ({
childProcess.catch(reject)
})

childProcess.on('exit', (code, signal) => {
const reason = signal ? `via signal ${signal}` : `with code: ${code}`
const msg = `Zinnia exited ${reason}`
onActivity({ type: 'info', message: msg })
})

await Promise.all([
(async () => {
try {
Expand Down

0 comments on commit 1df29f1

Please sign in to comment.