From fc003df5de5713fd35ef24e3d83c979653841728 Mon Sep 17 00:00:00 2001 From: ningmingxiao Date: Tue, 16 Sep 2025 11:27:44 +0800 Subject: [PATCH] fix:ci panic because res=nil Signed-off-by: ningmingxiao --- pkg/testutil/testutil.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index f6bf39dda7a..7d65ec0bf7e 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -397,6 +397,7 @@ func (c *Cmd) AssertFail() { func (c *Cmd) AssertExitCode(exitCode int) { c.Base.T.Helper() res := c.runIfNecessary() + assert.Equal(c.Base.T, res == nil, false) assert.Assert(c.Base.T, res.ExitCode == exitCode, res) }