Morganamilo/paru · error · anyhow::Error
option ' ' does not take a value
Error message
option '{}' does not take a value What it means
When parsing the [options] section of the config, each key must be a known option and, if it is a boolean-style option (ok1), it must not be given an explicit value. This error means the user supplied `option = value` (has_value) for an option that does not take one.
Solutions
- Remove the value from the option in [options]: write just the option name
- Check `man paru.conf` for which options take values and which are flags
- Upgrade/downgrade paru if the option semantics changed between versions
Example fix
// before (paru.conf [options]) SudoLoop = true // after [options] SudoLoop
Defensive patterns
Strategy: validation
Validate before calling
// ensure flag-style [options] entries have no '=' value
const FLAG_OPTIONS: &[&str] = &["SudoLoop", "Devel", "CleanAfter"];
fn takes_value(option: &str) -> bool { !FLAG_OPTIONS.contains(&option) } Prevention
- Write boolean options without '= value' in paru.conf
- Consult man paru.conf for option arity
- Diff your config against a fresh example after upgrading paru
When it happens
Trigger: A line like `SomeFlag = true` in the [options] section of paru.conf where SomeFlag is a flag-style option parsed via parse_options's ok1 branch.
Common situations: Users copying pacman.conf-style syntax into paru.conf; adding `= true`/`= yes` to boolean options after a paru version changed option parsing.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- option expects a value
- unknown option
- unknown option
- option does not allow a value
- option must be a number
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/912ed151c36df5cc.
Report an issue: GitHub.
Appendix: source
Thrown at src/config.rs:1153
for word in value?.split_whitespace() {
self.no_warn_builder.add(Glob::new(word)?);
}
}
"Mode" => {
for word in value?.split_whitespace() {
self.mode |= word.parse()?;
}
}
_ => ok2 = false,
};
if !(ok1 || ok2) {
eprintln!(
"{}",
tr!("error: unknown option '{}' in section [options]", key)
)
} else {
ensure!(
ok1 || has_value,
tr!("option '{}' does not take a value", key)
);
}
Ok(())
}
pub fn aur_namespace(&self) -> &str {
if self.pacman.repos.iter().any(|r| r.name == "aur") {
// hack for search install
"__aur__"
} else {
"aur"
}
}
}
pub fn version() {View on GitHub (pinned to 9ac3578807)