diff --git a/cmd/soroban-cli/src/commands/cache/mod.rs b/cmd/soroban-cli/src/commands/cache/mod.rs index 32302e9d3..87ee351ae 100644 --- a/cmd/soroban-cli/src/commands/cache/mod.rs +++ b/cmd/soroban-cli/src/commands/cache/mod.rs @@ -2,35 +2,36 @@ use clap::Parser; pub mod actionlog; pub mod clean; -pub mod info; +pub mod path; #[derive(Debug, Parser)] pub enum Cmd { - /// Access details about (transactions, simulations) + /// Delete the cache + Clean(clean::Cmd), + /// Show the location of the cache + Path(path::Cmd), + /// Access details about cached actions like transactions, and simulations. + /// (Experimental. May see breaking changes at any time.) #[command(subcommand)] Actionlog(actionlog::Cmd), - /// Delete all cached actions - Clean(clean::Cmd), - /// Show location of cache - Info(info::Cmd), } #[derive(thiserror::Error, Debug)] pub enum Error { - #[error(transparent)] - Actionlog(#[from] actionlog::Error), #[error(transparent)] Clean(#[from] clean::Error), #[error(transparent)] - Info(#[from] info::Error), + Path(#[from] path::Error), + #[error(transparent)] + Actionlog(#[from] actionlog::Error), } impl Cmd { pub fn run(&self) -> Result<(), Error> { match self { - Cmd::Actionlog(cmd) => cmd.run()?, - Cmd::Info(cmd) => cmd.run()?, Cmd::Clean(cmd) => cmd.run()?, + Cmd::Path(cmd) => cmd.run()?, + Cmd::Actionlog(cmd) => cmd.run()?, }; Ok(()) } diff --git a/cmd/soroban-cli/src/commands/cache/info.rs b/cmd/soroban-cli/src/commands/cache/path.rs similarity index 85% rename from cmd/soroban-cli/src/commands/cache/info.rs rename to cmd/soroban-cli/src/commands/cache/path.rs index beb2cafe3..337608735 100644 --- a/cmd/soroban-cli/src/commands/cache/info.rs +++ b/cmd/soroban-cli/src/commands/cache/path.rs @@ -15,7 +15,7 @@ pub struct Cmd {} impl Cmd { pub fn run(&self) -> Result<(), Error> { - println!("{:?}", data::data_local_dir()?); + println!("{}", data::data_local_dir()?.to_string_lossy()); Ok(()) } }