Skip to content

Commit 6cf9b4c

Browse files
committed
tweak
1 parent 54e4db8 commit 6cf9b4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/fleet/integration_policy/secrets.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ type secretStore map[string]any
1818
// newSecretStore creates a new secretStore from the resource privateData.
1919
// If the store already exists, it is filtered by any references in the resp policy.
2020
func newSecretStore(ctx context.Context, resp *fleetapi.PackagePolicy, private privateData) (store secretStore, diags diag.Diagnostics) {
21-
bytes, diags := private.GetKey(ctx, "secrets")
22-
if diags != nil {
21+
bytes, nd := private.GetKey(ctx, "secrets")
22+
diags.Append(nd...)
23+
if diags.HasError() {
2324
return
2425
}
26+
2527
if len(bytes) == 0 {
2628
store = secretStore{}
2729
return

0 commit comments

Comments
 (0)