pbakaus/impeccable · error
{message}
Error message
{message}
What it means
In ignores::run, after an action executes, an Err(message) from the action handler (add-rule, remove-file, clear, etc.) is printed verbatim to stderr followed by a newline, and the process exits with code 1. This is the generic failure sink for all ignores sub-actions; the actual reason lives in the wrapped message (e.g. missing argument, config write failure).
Source
Thrown at crates/detect/src/ignores.rs:563
let out = match action {
"list" => Ok(list(&cwd)),
"add-rule" => add_rule(&cwd, &rest),
"add-file" => add_file(&cwd, &rest),
"add-value" => add_value(&cwd, &rest),
"remove-rule" => remove_rule(&cwd, &rest),
"remove-file" => remove_file(&cwd, &rest),
"remove-value" => remove_value(&cwd, &rest),
_ => clear(&cwd, &rest),
};
match out {
Ok(text) => {
if !text.is_empty() {
io.out(&format!("{text}\n"));
}
0
}
Err(message) => {
io.err(&format!("{message}\n"));
1
}
}
}
View on GitHub (pinned to 2bc2879276)
Solutions
- Read the message printed after this prefix — it names the specific failing action and reason
- Supply the missing argument, e.g. `impeccable ignores add-rule <rule-id>` instead of a bare `add-rule`
- Check write permissions on the config location (shared vs local scope) if the message mentions writing
- Run `impeccable ignores list` first to verify the config parses and see current entries
Example fix
// before $ impeccable ignores add-rule Error: ... // after $ impeccable ignores add-rule suspicious-pattern
Defensive patterns
Strategy: validation
Validate before calling
const needsArg = ['add-rule','add-file','add-value','remove-rule','remove-value'];
if (needsArg.includes(action) && restArgs.length === 0) {
throw new Error(`impeccable ignores ${action} requires an argument`);
} Try / catch
// ignores action failures print the reason on stderr, exit 1
const res = spawnSync('impeccable', ['ignores', action, value]);
if (res.status !== 0) {
console.error('ignores failed:', res.stderr.toString().trim());
} Prevention
- Provide the rule/file/value argument immediately after the action
- Ensure the config file location is writable before mutating ignores
- Run `impeccable ignores list` to confirm the config parses before adding entries
When it happens
Trigger: Any `impeccable ignores <action> ...` invocation whose handler returns Err — typically calling add-rule/add-file/add-value without a value argument, or a failure reading/writing the shared or local detection config file.
Common situations: Forgetting the rule/file/value argument after the action; a read-only config file or unwritable project directory blocking config writes; malformed existing detection config that fails to parse when adding an entry.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- {}
- usage: latest <slug-or-target> [--json]
- usage: close <resolved-target> <snapshot-file>
- usage: impeccable critique-storage <slug|write|latest|trend|
- {}
AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08).
Data as JSON: /api/errors/64fb0173df3d26a9.
Report an issue: GitHub.