From 8578b779e29ad5b1a6042437ef117b9a7b99884d Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Thu, 20 Oct 2022 10:10:08 -0700 Subject: [PATCH] health-checker cri: fix invalid command --- pkg/healthchecker/health_checker.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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