diff --git a/cmd/get.go b/cmd/get.go index b9411898..dd2231c2 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -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 != "" {