diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b3ac31..3316ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix a bug where key permissions where being printed in decimal format instead of octal. +- `wire inspect names` without `--json` will now correctly output names as a + newline separated string instead of always as a json list. ### Removed diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 548f334..7e618d8 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -140,8 +140,13 @@ async fn main() -> Result<()> { } } cli::Inspection::Names => { - serde_json::to_string(&get_hive_node_names(&location, modifiers).await?) - .into_diagnostic()? + let names = get_hive_node_names(&location, modifiers).await?; + + if json { + serde_json::to_string(&names).into_diagnostic()? + } else { + names.join("\n") + } } } }),