{"record":{"id":"170657679e6c0713","repo":"jdx/mise","slug":"path-raw-id-unknown-line-position-other","errorCode":null,"errorMessage":"\"{path_raw}\".{id}: unknown line position '{other}' (expected \"append\" or \"prepend\"), ignoring entry","messagePattern":"\"(.+?)\"\\.(.+?): unknown line position '(.+?)' \\(expected \"append\" or \"prepend\"\\), ignoring entry","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/edits.rs","lineNumber":360,"sourceCode":"                source,\n                template,\n                comment,\n            }\n        }\n        (false, Some(line)) => {\n            // a \"line\" is matched against the file's individual lines, so an\n            // embedded newline could never converge — use a block for\n            // multi-line content\n            if line.contains('\\n') {\n                bail!(\n                    \"\\\"{path_raw}\\\".{id}: line may not contain a newline; use a block for multi-line content, ignoring entry\"\n                )\n            }\n            let position = match entry.position.as_deref() {\n                None | Some(\"append\") => LinePosition::Append,\n                Some(\"prepend\") => LinePosition::Prepend,\n                Some(other) => {\n                    bail!(\n                        \"\\\"{path_raw}\\\".{id}: unknown line position '{other}' (expected \\\"append\\\" or \\\"prepend\\\"), ignoring entry\"\n                    )\n                }\n            };\n            EditOp::Line {\n                line: line.clone(),\n                position,\n            }\n        }\n    };\n    Ok(EditRequest {\n        path_raw: path_raw.to_string(),\n        path,\n        id,\n        op,\n        base: base.to_path_buf(),\n        config_path: config_path.to_path_buf(),\n        origin,","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/edits.rs#L342-L378","documentation":"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.","triggerScenarios":"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\".","commonSituations":"Guessing at position vocabulary from other tools; casing mistakes; using \"after\"/\"before\" assuming relative-to-match semantics.","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."],"exampleFix":"// before\n[[dotfiles]]\nid = \"path-line\"\npath = \"~/.zshrc\"\nline = \"export PATH=$HOME/bin:$PATH\"\nposition = \"end\"\n\n// after\n[[dotfiles]]\nid = \"path-line\"\npath = \"~/.zshrc\"\nline = \"export PATH=$HOME/bin:$PATH\"\nposition = \"append\"","handlingStrategy":"validation","validationCode":"if let Some(pos) = entry.position.as_deref() {\n    assert!(matches!(pos, \"append\" | \"prepend\"), \"entry {}: position must be append or prepend\", entry.id);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["config","validation","dotfiles","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}