Skip to content

Commit

Permalink
generate: check for existing public key in manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
davidweisse committed Jun 27, 2024
1 parent b793268 commit 0d5512d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ func addSeedshareOwnerKeyToManifest(manifst *manifest.Manifest, keyPath string)
default:
return fmt.Errorf("unsupported PEM block type: %s", block.Type)
}
manifst.SeedshareOwnerPubKeys = append(manifst.SeedshareOwnerPubKeys, publicKey)
if !slices.Contains(manifst.SeedshareOwnerPubKeys, publicKey) {
manifst.SeedshareOwnerPubKeys = append(manifst.SeedshareOwnerPubKeys, publicKey)
}

return nil
}
Expand Down

0 comments on commit 0d5512d

Please sign in to comment.