Skip to content

Commit

Permalink
Improve some messages in config auto (#3438)
Browse files Browse the repository at this point in the history
  • Loading branch information
romac authored Jun 22, 2023
1 parent ab51ec1 commit d9296b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions crates/relayer-cli/src/commands/config/auto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl Runnable for AutoCmd {
let chain_id = &chain_config.id;
let key = find_key(chain_config);
if let Some(key) = key {
info!("{}: uses key \"{}\"", &chain_id, &key);
info!("{}: uses key '{}'", &chain_id, &key);
chain_config.key_name = key;
} else {
// If no key is found, warn the user and continue
Expand All @@ -119,17 +119,15 @@ impl Runnable for AutoCmd {
};

match store(&config, &self.path) {
Ok(_) => Output::success(format!(
"Config file written successfully at {}.",
self.path.to_str().unwrap()
Ok(_) => Output::success_msg(format!(
"Config file written successfully at '{}'",
self.path.display()
))
.exit(),
Err(e) => Output::error(e.to_string()).exit(),
Err(e) => Output::error(e).exit(),
}
}
Err(e) => {
Output::error(e.to_string()).exit();
}
Err(e) => Output::error(e).exit(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion guide/src/documentation/commands/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Use `config auto` to generate a configuration file that is able to relay between
2022-08-16T17:27:27.800213Z INFO ThreadId(01) cosmoshub-4: uses key "key_cosmoshub"
2022-08-16T17:27:27.841167Z INFO ThreadId(01) osmosis-1: uses key "key_osmosis"
2022-08-16T17:27:27.841890Z WARN ThreadId(01) Gas parameters are set to default values.
SUCCESS "Config file written successfully : ~/example_config.toml."
SUCCESS Config file written successfully at '~/example_config.toml'
```

It is also possible to manually specify a key name for any chain.
Expand Down

0 comments on commit d9296b5

Please sign in to comment.