Skip to content

Commit 9b6aca4

Browse files
committed
Add newline to missingrules error
This prevents the missing rules output from running straight into any following authorization error. Linting exception added for ending error in newline--the clarity created by the newline is useful with such a long output.. Signed-off-by: Tayler Geiger <[email protected]>
1 parent 0d9e91d commit 9b6aca4

File tree

1 file changed

+1
-1
lines changed
  • internal/operator-controller/applier

1 file changed

+1
-1
lines changed

internal/operator-controller/applier/helm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (h *Helm) runPreAuthorizationChecks(ctx context.Context, ext *ocv1.ClusterE
103103
}
104104
}
105105
slices.Sort(missingRuleDescriptions)
106-
preAuthErrors = append(preAuthErrors, fmt.Errorf("service account requires the following permissions to manage cluster extension:\n %s", strings.Join(missingRuleDescriptions, "\n ")))
106+
preAuthErrors = append(preAuthErrors, fmt.Errorf("service account requires the following permissions to manage cluster extension:\n %s\n", strings.Join(missingRuleDescriptions, "\n "))) //nolint:stylecheck
107107
}
108108
if authErr != nil {
109109
preAuthErrors = append(preAuthErrors, fmt.Errorf("authorization evaluation error: %w", authErr))

0 commit comments

Comments
 (0)