Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip config processing for the completions command #1822

Merged
merged 2 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Do not require a config file to be present for the `completions` command.
([#1822](https://github.com/informalsystems/ibc-rs/pull/1822))
10 changes: 7 additions & 3 deletions relayer-cli/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ impl Runnable for EntryPoint {
impl Configurable<Config> for EntryPoint {
/// Path to the command's configuration file
fn config_path(&self) -> Option<PathBuf> {
// Skip config processing for the legacy `version` subcommand
if matches!(&self.command, Some(CliCmd::Version(_))) {
return None;
// Skip config processing for `completions`
// and the legacy `version` subcommand.
match &self.command {
Some(CliCmd::Completions(_)) | Some(CliCmd::Version(_)) => {
return None;
}
_ => {}
}

match &self.config {
Expand Down