From e4bc9abaa983121a3a42236739d4c2dbfdfe7343 Mon Sep 17 00:00:00 2001 From: Frederik Vosberg Date: Fri, 18 Jan 2019 19:09:05 +0100 Subject: [PATCH] [FIX] keepalive is ignored on startcmd error Fixes #63 --- cmd/watcher/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/watcher/main.go b/cmd/watcher/main.go index 60e2827..2e7c5c3 100644 --- a/cmd/watcher/main.go +++ b/cmd/watcher/main.go @@ -156,7 +156,10 @@ func main() { c.Stdin = os.Stdin c.Stdout = os.Stdout c.Stderr = os.Stderr - if err := c.Run(); err != nil { + err := c.Run() + if err != nil && *keepalive { + log.Println(err) + } else if err != nil { log.Fatalln(err) } }