Skip to content

Commit

Permalink
quiet
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Dec 19, 2024
1 parent 334f5f7 commit 61b0e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/soroban-cli/src/commands/keys/add.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use clap::command;

use crate::{
commands::global,
config::{locator, secret},
print::Print,
};
Expand Down Expand Up @@ -28,8 +29,8 @@ pub struct Cmd {
}

impl Cmd {
pub fn run(&self) -> Result<(), Error> {
let print = Print::new(false);
pub fn run(&self, global_args: &global::Args) -> Result<(), Error> {
let print = Print::new(global_args.quiet);
let secret = self.secrets.read_secret()?;
let path = self.config_locator.write_identity(&self.name, &secret)?;
print.checkln(format!("Key saved with alias {:?} in {path:?}", self.name));
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/keys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pub enum Error {
impl Cmd {
pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
match self {
Cmd::Add(cmd) => cmd.run()?,
Cmd::Add(cmd) => cmd.run(global_args)?,
Cmd::Address(cmd) => cmd.run()?,
Cmd::Fund(cmd) => cmd.run(global_args).await?,
Cmd::Generate(cmd) => cmd.run(global_args).await?,
Expand Down

0 comments on commit 61b0e95

Please sign in to comment.