AprilNEA/OpenLogi · error
--output directory name must exactly equal --id
Error message
--output directory name must exactly equal --id
What it means
The `--output` path's final directory component must be exactly equal to the `--id` value. Synthetic fixture directories are identified by their directory name, so mismatched output dir vs id would create an inconsistent fixture. Caught up front in `validate_args`.
Solutions
- Rename the output directory's last component to match `--id` exactly (including case).
- Or change `--id` to equal the existing output directory name if that name is already correct.
- Create the target dir with the id as its name: `mkdir -p out/$(id)` and pass `--output out/<id>`.
Example fix
// before openlogi fixture contribute --id mx-master --name "MX Master" --output out/mx-master-3 // after openlogi fixture contribute --id mx-master --name "MX Master" --output out/mx-master
Defensive patterns
Strategy: validation
Validate before calling
[ "$(basename "$OUT")" = "$ID" ] || { echo "--output dir name must equal --id" >&2; exit 1; } Prevention
- Derive the output dir from the id in scripts: OUT="fixtures/$ID".
- Never edit --id and --output independently in copied commands.
- Match case exactly — the comparison is byte-equal.
When it happens
Trigger: e.g. `--id mx-master --output ./out/mx-master-3` or `--output ./out/other-name` — any case where `Path::new(output).file_name() != id`.
Common situations: Reusing a previous output directory name while changing the id, or copying a command line and editing only one of the two flags.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- saved contribution profile does not match its resumable…
- --id must be a nonempty synthetic path component
- --id must be one synthetic path component without separators
- --name must be a nonempty synthetic device name
- --id and --name must match the in-progress contribution
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/14d4fae1bfa85160.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/fixture/contribute.rs:459
)
}
}
fn validate_args(args: &ContributeArgs) -> Result<()> {
if args.id.trim().is_empty() || matches!(args.id.as_str(), "." | "..") {
bail!("--id must be a nonempty synthetic path component");
}
if Path::new(&args.id).file_name() != Some(OsStr::new(&args.id))
|| args.id.contains('/')
|| args.id.contains('\\')
{
bail!("--id must be one synthetic path component without separators");
}
if args.name.trim().is_empty() {
bail!("--name must be a nonempty synthetic device name");
}
if args.output.file_name() != Some(OsStr::new(&args.id)) {
bail!("--output directory name must exactly equal --id");
}
Ok(())
}
fn validate_state(args: &ContributeArgs, state: &ContributionState) -> Result<()> {
if state.version != STATE_VERSION {
bail!("unsupported contribution state version {}", state.version);
}
if state.fixture_id != args.id
|| state.profile_id != format!("{}-profile", args.id)
|| state.profile_name != args.name
{
bail!("--id and --name must match the in-progress contribution");
}
Ok(())
}
fn read_json<T: serde::de::DeserializeOwned>(path: &Path, asset: &str) -> Result<T> {View on GitHub (pinned to e846e6f4b4)