Skip to content

Commit

Permalink
Skip config processing for the completions command (informalsystems#1822
Browse files Browse the repository at this point in the history
)

* Skip config processing for the completions command

* Changelog entry for informalsystems#1822
  • Loading branch information
mzabaluev authored Jan 31, 2022
1 parent d320170 commit ab5ddc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit ab5ddc5

Please sign in to comment.