Skip to content

Commit

Permalink
feat(cargo): add hint for secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazy committed Oct 24, 2023
1 parent 9fe9826 commit 452d20e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion common/src/models/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,16 @@ fn get_databases_table(
table.add_row(vec![database.r#type.to_string(), conn_string]);
}

format!("These databases are linked to {service_name}\n{table}\n")
let show_secret_hint = if databases.is_empty() || show_secrets {
""
} else {
"Hint: you can show the secrets of these resources using --show-secrets\n"
};

format!(
"These databases are linked to {service_name}\n{table}\n{}",
show_secret_hint
)
}

fn get_secrets_table(secrets: &[&Response], service_name: &str, raw: bool) -> String {
Expand Down

0 comments on commit 452d20e

Please sign in to comment.