{"record":{"id":"58894f2dedb86e87","repo":"can1357/oh-my-pi","slug":"0-58894f","errorCode":null,"errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"error_code","errorClass":"LnError","httpStatus":null,"severity":"error","filePath":"crates/pi-builtins/src/ln.rs","lineNumber":71,"sourceCode":"\t#[error(\"target {} is not a directory\", _0.quote())]\n\tTargetIsNotADirectory(PathBuf),\n\n\t#[error(\"\")]\n\tSomeLinksFailed,\n\n\t#[error(\"{} and {} are the same file\", _0.quote(), _1.quote())]\n\tSameFile(PathBuf, PathBuf),\n\n\t#[error(\"missing destination file operand after {}\", _0.quote())]\n\tMissingDestination(PathBuf),\n\n\t#[error(\"extra operand {}\\nTry '{} --help' for more information.\", _0.quote(), _1)]\n\tExtraOperand(OsString, String),\n\n\t#[error(\"{}: hard link not allowed for directory\", _0.to_string_lossy())]\n\tFailedToCreateHardLinkDir(PathBuf),\n\n\t#[error(\"{0}\")]\n\tMessage(String),\n\n\t#[error(\"{0}\")]\n\tIo(#[from] std::io::Error),\n}\n\n\nmod options {\n\tpub const FORCE: &str = \"force\";\n\t//pub const DIRECTORY: &str = \"directory\";\n\tpub const INTERACTIVE: &str = \"interactive\";\n\tpub const NO_DEREFERENCE: &str = \"no-dereference\";\n\tpub const SYMBOLIC: &str = \"symbolic\";\n\tpub const LOGICAL: &str = \"logical\";\n\tpub const PHYSICAL: &str = \"physical\";\n\tpub const TARGET_DIRECTORY: &str = \"target-directory\";\n\tpub const NO_TARGET_DIRECTORY: &str = \"no-target-directory\";\n\tpub const RELATIVE: &str = \"relative\";","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/crates/pi-builtins/src/ln.rs#L53-L89","documentation":"The ln builtin's Message(String) variant is a catch-all error carrying a pre-formatted message. It surfaces whenever link-creation logic produces an ad-hoc failure string that doesn't map to a specific structured variant, so the displayed error is exactly the wrapped text.","triggerScenarios":"Any internal ln failure path that constructs LsError/LinkError::Message with context-specific text (e.g. malformed option combinations or host-reported failures not covered by other variants).","commonSituations":"Unusual option usage (e.g. conflicting flags); embedders passing exotic arguments through the builtin API.","solutions":["Read the wrapped message text — it is the actionable description","Check the ln flags passed for invalid combinations","If the message is opaque, reproduce with simpler arguments to isolate the failing operand"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match ln(&host, args) {\n    Err(e) => {\n        let msg = e.to_string(); // Message(String) renders as {0}\n        eprintln!(\"ln failed: {msg}\");\n        // surface or map msg to a caller-specific error\n    }\n    ok => ok?,\n}","preventionTips":["Read the wrapped message — it is the full diagnostic","Reproduce with minimal arguments to isolate which flag/operand the ad-hoc path rejects"],"tags":["filesystem","hardlink","generic-error"],"backgroundTag":"builtin-command-failed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}