Fix zenith init defaults

This commit is contained in:
Kirill Bulatov
2021-12-27 18:59:17 +02:00
committed by Kirill Bulatov
parent b494ac1ea0
commit f0afd08667
3 changed files with 9 additions and 9 deletions

View File

@@ -64,10 +64,10 @@ fn main() -> Result<()> {
.get_matches();
let workdir = Path::new(arg_matches.value_of("workdir").unwrap_or(".zenith"));
let cfg_file_path = workdir
let workdir = workdir
.canonicalize()
.with_context(|| format!("Error opening workdir '{}'", workdir.display()))?
.join("pageserver.toml");
.with_context(|| format!("Error opening workdir '{}'", workdir.display()))?;
let cfg_file_path = workdir.join("pageserver.toml");
let init = arg_matches.is_present("init");
let create_tenant = arg_matches.value_of("create-tenant");
@@ -119,7 +119,7 @@ fn main() -> Result<()> {
}
}
trace!("Resulting toml: {}", toml);
let conf = PageServerConf::parse_and_validate(&toml, workdir)
let conf = PageServerConf::parse_and_validate(&toml, &workdir)
.context("Failed to parse pageserver configuration")?;
// The configuration is all set up now. Turn it into a 'static