Update cmd/root.go

Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
bugficks 2023-08-23 14:14:31 +07:00 committed by GitHub
parent 3acc52ed59
commit adb0272901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}