Skip to content

Commit

Permalink
fix: add back run to config
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jan 4, 2024
1 parent cc2552d commit c7153f9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cmd/soroban-cli/src/commands/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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 {
Expand Down

0 comments on commit c7153f9

Please sign in to comment.