From 1da5333d53156852f40cad63ce152490612c2fd5 Mon Sep 17 00:00:00 2001 From: Adrian Benavides Date: Mon, 28 Oct 2024 19:46:36 +0100 Subject: [PATCH] fix(rust): `relay create` deprecated warning message --- .../rust/ockam/ockam_command/src/relay/create.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/implementations/rust/ockam/ockam_command/src/relay/create.rs b/implementations/rust/ockam/ockam_command/src/relay/create.rs index 47e45c5cd06..95eb5d02bfe 100644 --- a/implementations/rust/ockam/ockam_command/src/relay/create.rs +++ b/implementations/rust/ockam/ockam_command/src/relay/create.rs @@ -80,16 +80,17 @@ impl Command for CreateCommand { } async fn async_run(self, ctx: &Context, opts: CommandGlobalOpts) -> crate::Result<()> { + if self.project_relay { + print_deprecated_flag_warning(&opts, "--project-relay")?; + } + initialize_default_node(ctx, &opts).await?; + let cmd = self.parse_args(&opts).await?; let at = cmd.at(); let alias = cmd.relay_name(); let return_timing = cmd.return_timing(); - if cmd.project_relay { - print_deprecated_flag_warning(&opts, "--project-relay")?; - } - let node = BackgroundNodeClient::create(ctx, &opts.state, &cmd.to).await?; let relay_info = { if at.starts_with(Project::CODE) && cmd.authorized.is_some() {