Skip to content

Commit

Permalink
fix(rust): abort on ockam enroll --output json
Browse files Browse the repository at this point in the history
  • Loading branch information
kriogenia authored and adrianbenavides committed Oct 14, 2023
1 parent 8373fa4 commit b8f0bdd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use ockam_api::nodes::InMemoryNode;
use crate::enroll::OidcServiceExt;
use crate::identity::initialize_identity_if_default;
use crate::operation::util::check_for_completion;
use crate::output::OutputFormat;
use crate::project::util::check_project_readiness;
use crate::terminal::OckamColor;
use crate::util::node_rpc;
Expand Down Expand Up @@ -57,6 +58,12 @@ impl EnrollCommand {
}

async fn rpc(ctx: Context, (opts, cmd): (CommandGlobalOpts, EnrollCommand)) -> miette::Result<()> {
if opts.global_args.output_format == OutputFormat::Json {
return Err(miette::miette!(
"The flag --output json is invalid for this command."
));
}

run_impl(&ctx, opts, cmd).await
}

Expand Down

0 comments on commit b8f0bdd

Please sign in to comment.