jdx/mise · error
"{path_raw}".{id}: unknown line position '{other}' (expected
Error message
"{path_raw}".{id}: unknown line position '{other}' (expected "append" or "prepend"), ignoring entry What it means
The `position` field of a line-based edit entry accepts only "append" (default) or "prepend". resolve_entry raises this error and ignores the entry when any other string is supplied, since no other line placement mode exists.
Source
Thrown at src/system/edits.rs:360
source,
template,
comment,
}
}
(false, Some(line)) => {
// a "line" is matched against the file's individual lines, so an
// embedded newline could never converge — use a block for
// multi-line content
if line.contains('\n') {
bail!(
"\"{path_raw}\".{id}: line may not contain a newline; use a block for multi-line content, ignoring entry"
)
}
let position = match entry.position.as_deref() {
None | Some("append") => LinePosition::Append,
Some("prepend") => LinePosition::Prepend,
Some(other) => {
bail!(
"\"{path_raw}\".{id}: unknown line position '{other}' (expected \"append\" or \"prepend\"), ignoring entry"
)
}
};
EditOp::Line {
line: line.clone(),
position,
}
}
};
Ok(EditRequest {
path_raw: path_raw.to_string(),
path,
id,
op,
base: base.to_path_buf(),
config_path: config_path.to_path_buf(),
origin,View on GitHub (pinned to afd2eddd3a)
Solutions
- Change the value to exactly "append" or "prepend".
- Remove the position field to use the default (append).
- Remember matching is case-sensitive: "Append" is invalid.
Example fix
// before [[dotfiles]] id = "path-line" path = "~/.zshrc" line = "export PATH=$HOME/bin:$PATH" position = "end" // after [[dotfiles]] id = "path-line" path = "~/.zshrc" line = "export PATH=$HOME/bin:$PATH" position = "append"
Defensive patterns
Strategy: validation
Validate before calling
if let Some(pos) = entry.position.as_deref() {
assert!(matches!(pos, "append" | "prepend"), "entry {}: position must be append or prepend", entry.id);
} Prevention
- Use only the exact lowercase strings "append" or "prepend".
- Omit position to get the default append behavior.
- Share a small config snippet library so position vocabulary stays consistent.
When it happens
Trigger: A [dotfiles] line entry sets `position = "end"`, `position = "start"`, `position = "after"`, `position = "APPEND"` (case-sensitive), or any value other than the exact strings "append" or "prepend".
Common situations: Guessing at position vocabulary from other tools; casing mistakes; using "after"/"before" assuming relative-to-match semantics.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- dotfiles: {key} could not be tracked: {reason}
- [dotfiles]."{req.target_raw}": mode symlink-each requires a
- invalid compose dependency '{value}': supported kinds are pa
- "{path_raw}".{id}: block/source and line are mutually exclus
- "{path_raw}".{id}: no recognized operation (block, source, o
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/170657679e6c0713.
Report an issue: GitHub.