Skip to content

Commit

Permalink
Log program start success after checking for errors, not before
Browse files Browse the repository at this point in the history
  • Loading branch information
khrj committed Mar 19, 2021
1 parent f03d4a7 commit e2e124f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ func updateAndRestartProcess(isStandalone bool) error {
if isStandalone {
cmd = buildCmd(flag.Args(), true)
err := cmd.Start()
logger.Success(statProgramStart)

if err != nil {
logger.Error(sFailedToStartChildProcessError)
return err
}

logger.Success(statProgramStart)
} else {
cmd = buildCmd(flag.Args(), false)
}
Expand Down

1 comment on commit e2e124f

@vercel
Copy link

@vercel vercel bot commented on e2e124f Mar 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.