diff --git a/cmd/root.go b/cmd/root.go index ff46da7..4242d17 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -157,7 +157,8 @@ func Run(c *cobra.Command, names []string) { if healthCheck { // health check should not have pid 1 if os.Getpid() == 1 { - os.Exit(1) + time.Sleep(1 * time.Second) + log.Fatal("The health check flag should never be passed to the main watchtower container process") } os.Exit(0) }