Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: hide not found text when flag plain is enabled

Sheen Capadngan14c1b4f07b2c
diff --git a/cli/packages/cmd/secrets.go b/cli/packages/cmd/secrets.go
index 1ddfcc135f..2addf1c839 100644
--- a/cli/packages/cmd/secrets.go
+++ b/cli/packages/cmd/secrets.go
@@ -415,11 +415,13 @@ func getSecretsByNames(cmd *cobra.Command, args []string) {
if value, ok := secretsMap[secretKeyFromArg]; ok {
requestedSecrets = append(requestedSecrets, value)
} else {
- requestedSecrets = append(requestedSecrets, models.SingleEnvironmentVariable{
- Key: secretKeyFromArg,
- Type: "*not found*",
- Value: "*not found*",
- })
+ if !(plainOutput || showOnlyValue) {
+ requestedSecrets = append(requestedSecrets, models.SingleEnvironmentVariable{
+ Key: secretKeyFromArg,
+ Type: "*not found*",
+ Value: "*not found*",
+ })
+ }
}
}