Skip to content

Commit

Permalink
relay-cli: Handle None case for shared base path (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian authored Dec 16, 2022
1 parent 7d3035a commit 6ee509a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,12 @@ impl CliConfiguration<Self> for RelayChainCli {
}

fn base_path(&self) -> Result<Option<BasePath>> {
self.shared_params()
Ok(self
.shared_params()
.base_path()
.or_else(|_| Ok(self.base_path.clone().map(Into::into)))
.ok()
.flatten()
.or_else(|| self.base_path.clone().map(Into::into)))
}

fn role(&self, is_dev: bool) -> Result<sc_service::Role> {
Expand Down

0 comments on commit 6ee509a

Please sign in to comment.