zeroclaw-labs/zeroclaw · error · anyhow::Error
--config-dir cannot be empty
Error message
--config-dir cannot be empty
What it means
Error "--config-dir cannot be empty" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at src/main.rs:3473
"cli-warn-crypto-provider",
&[("err", &format!("{e:?}"))],
"Warning: Failed to install default crypto provider"
)
);
}
let cmd = apply_i18n_to_command(command);
if std::env::args_os().len() <= 1 {
return print_no_command_help(cmd);
}
let cli = Cli::from_arg_matches(&cmd.get_matches()).map_err(|e| e.exit())?;
if let Some(config_dir) = &cli.config_dir
&& config_dir.trim().is_empty()
{
bail!("--config-dir cannot be empty");
}
#[cfg(feature = "agent-runtime")]
crate::i18n::init(&crate::i18n::detect_locale());
// Completions must remain stdout-only and should not load config or initialize logging.
// This avoids warnings/log lines corrupting sourced completion scripts.
if let Commands::Completions { shell } = &cli.command {
let mut stdout = std::io::stdout().lock();
write_shell_completion(*shell, &mut stdout)?;
return Ok(());
}
// Docs-pipeline subcommands: stdout-only, no config load, no logging init.
match &cli.command {
Commands::MarkdownHelp => {
clap_markdown::print_help_markdown::<Cli>();
return Ok(());View on GitHub (pinned to 88bb9c8533)
Solutions
- Pass a non-empty path to --config-dir, e.g. `--config-dir ~/.zeroclaw`.
- Omit --config-dir to use the default configuration directory.
When it happens
Trigger: Thrown at src/main.rs:3473 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/f1b04423b6b67c76.
Report an issue: GitHub.