diff --git a/pkg/healthchecker/health_checker.go b/pkg/healthchecker/health_checker.go index 5856766d7..c1ff2bdae 100644 --- a/pkg/healthchecker/health_checker.go +++ b/pkg/healthchecker/health_checker.go @@ -150,7 +150,15 @@ func getHealthCheckFunc(hco *options.HealthCheckerOptions) func() (bool, error) } case types.CRIComponent: return func() (bool, error) { - if _, err := execCommand(hco.HealthCheckTimeout, hco.CriCtlPath, "--timeout="+hco.CriTimeout.String()+"--runtime-endpoint="+hco.CriSocketPath, "pods", "--latest"); err != nil { + _, err := execCommand( + hco.HealthCheckTimeout, + hco.CriCtlPath, + "--timeout="+hco.CriTimeout.String(), + "--runtime-endpoint="+hco.CriSocketPath, + "pods", + "--latest", + ) + if err != nil { return false, nil } return true, nil