Workdir config
This commit is contained in:
@@ -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()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user