Skip to content

Commit

Permalink
Check ProcessState
Browse files Browse the repository at this point in the history
  • Loading branch information
radovskyb committed Dec 10, 2018
1 parent 25a66c5 commit 428d358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/watcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func main() {
c.Stdout = os.Stdout
c.Stderr = os.Stderr
if err := c.Run(); err != nil {
if !c.ProcessState.Success() && *keepalive {
if (c.ProcessState == nil || !c.ProcessState.Success()) && *keepalive {
log.Println(err)
continue
}
Expand Down

0 comments on commit 428d358

Please sign in to comment.