From e3e474c1f75057df4a0531ff2b478d9f0dbaf077 Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Wed, 21 Feb 2024 13:11:54 +0100 Subject: [PATCH 1/2] fix(cli): Add missing output in "app get" command The println!() was probably lost in the recent refactor. --- lib/cli/src/commands/app/get.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cli/src/commands/app/get.rs b/lib/cli/src/commands/app/get.rs index 47886236fc4..5c1663652c4 100644 --- a/lib/cli/src/commands/app/get.rs +++ b/lib/cli/src/commands/app/get.rs @@ -30,6 +30,9 @@ impl AsyncCliCommand for CmdAppGet { async fn run_async(self) -> Result { let client = self.api.client()?; let (_ident, app) = self.ident.load_app(&client).await?; + + println!("{}", self.fmt.format.render(&app)); + Ok(app) } } From 2c1ad4526f25c780f893515f91794cdd2e9bf77a Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Wed, 21 Feb 2024 13:22:33 +0100 Subject: [PATCH 2/2] fix(cli): Fix output of "app info" command --- lib/cli/src/commands/app/info.rs | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/lib/cli/src/commands/app/info.rs b/lib/cli/src/commands/app/info.rs index 494581204cc..5455bfde47e 100644 --- a/lib/cli/src/commands/app/info.rs +++ b/lib/cli/src/commands/app/info.rs @@ -1,10 +1,7 @@ //! Show short information about an Edge app. use super::util::AppIdentOpts; -use crate::{ - commands::{app::get::CmdAppGet, AsyncCliCommand}, - opts::{ApiOpts, ItemFormatOpts}, -}; +use crate::{commands::AsyncCliCommand, opts::ApiOpts}; /// Show short information about an Edge app. /// @@ -13,9 +10,6 @@ use crate::{ pub struct CmdAppInfo { #[clap(flatten)] api: ApiOpts, - #[clap(flatten)] - fmt: ItemFormatOpts, - #[clap(flatten)] ident: AppIdentOpts, } @@ -25,22 +19,19 @@ impl AsyncCliCommand for CmdAppInfo { type Output = (); async fn run_async(self) -> Result<(), anyhow::Error> { - let cmd_app_get = CmdAppGet { - api: self.api, - fmt: self.fmt, - ident: self.ident, - }; - let app = cmd_app_get.run_async().await?; + let client = self.api.client()?; + let (_ident, app) = self.ident.load_app(&client).await?; let app_url = app.url; let versioned_url = app.active_version.url; let dashboard_url = app.admin_url; - eprintln!(" App Info "); - eprintln!("> App Name: {}", app.name); - eprintln!("> App URL: {}", app_url); - eprintln!("> Versioned URL: {}", versioned_url); - eprintln!("> Admin dashboard: {}", dashboard_url); + println!(" App Info "); + println!("> App Name: {}", app.name); + println!("> Namespace: {}", app.owner.global_name); + println!("> App URL: {}", app_url); + println!("> Versioned URL: {}", versioned_url); + println!("> Admin dashboard: {}", dashboard_url); Ok(()) }