Skip to content

Commit

Permalink
cli json
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Dec 3, 2024
1 parent c2420e5 commit fef7477
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/test-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,11 @@ pub async fn run_command(
},
CliCommand::GetOracleHeadings => {
let oracles_data = get_oracle_headings(&api, &rpc).await?;
Ok(format!("{:?}", oracles_data))
if cli.json {
Ok(serde_json::to_string_pretty(&oracles_data)?)
} else {
Ok(format!("{:?}", oracles_data))
}
},
CliCommand::GetTdxQuote { tss_endpoint, output_filename } => {
let quote_bytes =
Expand Down

0 comments on commit fef7477

Please sign in to comment.