From 01c2627df3b7295ef6a0f15de694b9e06aeffcd4 Mon Sep 17 00:00:00 2001 From: k1nho Date: Sat, 30 Sep 2023 12:24:53 -0400 Subject: [PATCH] fix(rust): improve ockam relay list display when local state is empty --- implementations/rust/ockam/ockam_command/src/relay/list.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/implementations/rust/ockam/ockam_command/src/relay/list.rs b/implementations/rust/ockam/ockam_command/src/relay/list.rs index 02094acb383..8c7457f45c4 100644 --- a/implementations/rust/ockam/ockam_command/src/relay/list.rs +++ b/implementations/rust/ockam/ockam_command/src/relay/list.rs @@ -11,7 +11,7 @@ use ockam_api::cli_state::StateDirTrait; use ockam_api::nodes::models::forwarder::ForwarderInfo; use ockam_core::api::Request; -use crate::node::get_node_name; +use crate::node::{get_node_name, initialize_node_if_default}; use crate::terminal::OckamColor; use crate::util::{node_rpc, Rpc}; use crate::{docs, CommandGlobalOpts}; @@ -34,6 +34,7 @@ pub struct ListCommand { impl ListCommand { pub fn run(self, options: CommandGlobalOpts) { + initialize_node_if_default(&options, &self.to); node_rpc(run_impl, (options, self)); } }