diff --git a/cmd/soroban-cli/src/commands/config/mod.rs b/cmd/soroban-cli/src/commands/config/mod.rs index 1d0cd8678c..be76e77f9f 100644 --- a/cmd/soroban-cli/src/commands/config/mod.rs +++ b/cmd/soroban-cli/src/commands/config/mod.rs @@ -17,13 +17,15 @@ pub enum Cmd { /// Configure different networks. Depraecated, use `soroban network` instead. #[command(subcommand)] Network(network::Cmd), - /// Identity management. Deprecated use `soroban keys` instead. + /// Identity management. Deprecated, use `soroban keys` instead. #[command(subcommand)] Identity(keys::Cmd), } #[derive(thiserror::Error, Debug)] pub enum Error { + #[error(transparent)] + Identity(#[from] keys::Error), #[error(transparent)] Network(#[from] network::Error), #[error(transparent)] @@ -32,6 +34,16 @@ pub enum Error { Config(#[from] locator::Error), } +impl Cmd { + pub async fn run(&self) -> Result<(), Error> { + match &self { + Cmd::Identity(identity) => identity.run().await?, + Cmd::Network(network) => network.run()?, + } + Ok(()) + } +} + #[derive(Debug, clap::Args, Clone, Default)] #[group(skip)] pub struct Args {