Skip to content

Commit aeb85ab

Browse files
chmouelclaude
authored andcommitted
fix: use %w instead of %s for error wrapping in DetectPacInstallation
Preserves the error chain for errors.Is/errors.As callers. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cc818de commit aeb85ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cmd/tknpac/bootstrap/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func DetectPacInstallation(ctx context.Context, wantedNS string, run *params.Run
271271
if err == nil {
272272
return installed, cm.Namespace, nil
273273
}
274-
return installed, "", fmt.Errorf("could not detect Pipelines as Code configmap on the cluster, please specify the namespace in which pac is installed: %s", err.Error())
274+
return installed, "", fmt.Errorf("could not detect Pipelines as Code configmap on the cluster, please specify the namespace in which pac is installed: %w", err)
275275
}
276276

277277
func getConfigMap(ctx context.Context, run *params.Run) (*corev1.ConfigMap, error) {

0 commit comments

Comments
 (0)