Workdir config
All checks were successful
CI / Typos (push) Successful in 23s
CI / Build and test (push) Successful in 1m53s
CI / Clippy (push) Successful in 4m4s
Docker / build-and-push (push) Successful in 4m28s
CI / Build and test (all features) (push) Successful in 7m2s

This commit is contained in:
2026-03-26 19:31:40 -07:00
parent 80f4ebdbe6
commit 47a0adbaff
10 changed files with 45 additions and 20 deletions

View File

@@ -30,6 +30,10 @@ pub struct ItemCommand {
/// Path to dataset config
#[arg(long, short = 'c', default_value = "./pile.toml")]
config: PathBuf,
/// Working directory root
#[arg(long, default_value = "./.pile")]
workdir: PathBuf,
}
impl CliCmd for ItemCommand {
@@ -43,7 +47,7 @@ impl CliCmd for ItemCommand {
let source = Label::new(&self.source)
.ok_or_else(|| anyhow::anyhow!("invalid source name {:?}", self.source))?;
let ds = Datasets::open(&self.config)
let ds = Datasets::open(&self.config, &self.workdir)
.await
.with_context(|| format!("while opening dataset for {}", self.config.display()))?;