diff --git a/implementations/rust/ockam/ockam_command/src/space/list.rs b/implementations/rust/ockam/ockam_command/src/space/list.rs index c9bc93c9258..3d74d1296aa 100644 --- a/implementations/rust/ockam/ockam_command/src/space/list.rs +++ b/implementations/rust/ockam/ockam_command/src/space/list.rs @@ -63,9 +63,11 @@ async fn run_impl( let (spaces, _) = try_join!(get_spaces, progress_output)?; - let plain = opts - .terminal - .build_list(&spaces, "Spaces", "No spaces found.")?; + let plain = opts.terminal.build_list( + &spaces, + "Spaces", + "No spaces found. Run 'ockam enroll' to get a space and a project", + )?; let json = serde_json::to_string_pretty(&spaces).into_diagnostic()?; for space in spaces { diff --git a/implementations/rust/ockam/ockam_command/src/terminal/mod.rs b/implementations/rust/ockam/ockam_command/src/terminal/mod.rs index 943d1614fd6..645ba75a523 100644 --- a/implementations/rust/ockam/ockam_command/src/terminal/mod.rs +++ b/implementations/rust/ockam/ockam_command/src/terminal/mod.rs @@ -304,7 +304,7 @@ impl Terminal { pub fn build_list( &self, - items: &Vec, + items: &[impl crate::output::Output], header: &str, empty_message: &str, ) -> Result {