misc: hide not found text when flag plain is enabled

This commit is contained in:
Sheen Capadngan
2024-08-06 21:21:45 +08:00
parent 3028bdd424
commit 14c1b4f07b
+7 -5
View File
@@ -415,11 +415,13 @@ func getSecretsByNames(cmd *cobra.Command, args []string) {
if value, ok := secretsMap[secretKeyFromArg]; ok { if value, ok := secretsMap[secretKeyFromArg]; ok {
requestedSecrets = append(requestedSecrets, value) requestedSecrets = append(requestedSecrets, value)
} else { } else {
requestedSecrets = append(requestedSecrets, models.SingleEnvironmentVariable{ if !(plainOutput || showOnlyValue) {
Key: secretKeyFromArg, requestedSecrets = append(requestedSecrets, models.SingleEnvironmentVariable{
Type: "*not found*", Key: secretKeyFromArg,
Value: "*not found*", Type: "*not found*",
}) Value: "*not found*",
})
}
} }
} }