Skip to content

Commit

Permalink
chore(cli): showing cli final execution result explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi authored and RolandSherwin committed May 27, 2024
1 parent 5d20f98 commit 2bf9430
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions sn_cli/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,27 @@ async fn main() -> Result<()> {
// default to verifying storage
let should_verify_store = !opt.no_verify;

match opt.cmd {
// PowerShell seems having issue to showing the unwrapped error
// Hence capture the result and print it out explicity.
let cmd_str = format!("{:?}", opt.cmd);
let result = match opt.cmd {
SubCmd::Wallet(cmds) => {
wallet_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await?
wallet_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await
}
SubCmd::WatchOnlyWallet(cmds) => {
wo_wallet_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await?
wo_wallet_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await
}
SubCmd::Files(cmds) => {
files_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await?
files_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await
}
SubCmd::Folders(cmds) => {
folders_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await?
folders_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await
}
SubCmd::Register(cmds) => {
register_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await?
register_cmds(cmds, &client, &client_data_dir_path, should_verify_store).await
}
};
println!("Completed with {result:?} of execute {cmd_str:?}");

Ok(())
}
Expand Down

0 comments on commit 2bf9430

Please sign in to comment.