diff --git a/.changelog/unreleased/bug-fixes/ibc-relayer-cli/1822-skip-config-for-completions.md b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/1822-skip-config-for-completions.md new file mode 100644 index 0000000000..36eed16cc4 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/1822-skip-config-for-completions.md @@ -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)) diff --git a/relayer-cli/src/entry.rs b/relayer-cli/src/entry.rs index eb6eacf22e..4b535afac5 100644 --- a/relayer-cli/src/entry.rs +++ b/relayer-cli/src/entry.rs @@ -43,9 +43,13 @@ impl Runnable for EntryPoint { impl Configurable for EntryPoint { /// Path to the command's configuration file fn config_path(&self) -> Option { - // 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 {