From adb027290174dd092a7d1d06019bf89ef4c4eb96 Mon Sep 17 00:00:00 2001 From: bugficks Date: Wed, 23 Aug 2023 14:14:31 +0700 Subject: [PATCH] Update cmd/root.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: nils måsén --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) }