Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 8cfa494

Browse files
authored
Fix index dir priority (#455)
1 parent b8a57ca commit 8cfa494

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/bleep/src/config.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ impl Configuration {
189189

190190
pub fn cli_overriding_config_file() -> Result<Self> {
191191
let cli = Self::from_cli()?;
192-
let Ok(file) = cli.config_file.as_ref().context("no config file specified").and_then(Self::read) else {
192+
let Ok(file) = cli
193+
.config_file
194+
.as_ref()
195+
.context("no config file specified")
196+
.and_then(Self::read) else
197+
{
193198
return Ok(cli);
194199
};
195200

@@ -209,7 +214,7 @@ impl Configuration {
209214

210215
source: right_if_default!(b.source, a.source, Default::default()),
211216

212-
index_dir: b.index_dir,
217+
index_dir: right_if_default!(b.index_dir, a.index_dir, default_index_path()),
213218

214219
index_only: b.index_only | a.index_only,
215220

0 commit comments

Comments
 (0)