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() {