Skip to content

Commit

Permalink
fix: return projectkey if reveal not provided (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Oct 3, 2024
1 parent 83c2884 commit 82a91e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,12 @@ var getProjectKeyCmd = &cobra.Command{
if err != nil {
return err
}
if projectKey.PublicKey == "" && projectKey.PrivateKey == "" {
if projectKey.PublicKey == "" {
return handleNilResults("No project-key for project '%s'\n", cmd, cmdProjectName)
}
if revealValue && projectKey.PrivateKey == "" {
return handleNilResults("No private-key for project '%s'\n", cmd, cmdProjectName)
}

projectKeys := []string{projectKey.PublicKey}
if projectKey.PrivateKey != "" {
Expand Down

0 comments on commit 82a91e3

Please sign in to comment.