Skip to content

Commit abd6f95

Browse files
committed
microbench-ci: fix err check panic
The `skipPermissionError` function should be able to handle nil errors, otherwise we panic when trying to string match on a specific error. Epic: None Release note: None
1 parent c33f7aa commit abd6f95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cmd/microbench-ci/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ func makeCompareCommand() *cobra.Command {
164164
}
165165
if hasLabel || suite.changeDetected() {
166166
skipPermissionError := func(err error, action string) error {
167+
if err == nil {
168+
return nil
169+
}
167170
// If this is a permission error, we don't want to fail the build. This
168171
// can happen if the GitHub token has read-only access, for example when
169172
// testing the pull_request trigger from a fork.

0 commit comments

Comments
 (0)