{"record":{"id":"f19abc030606fab8","repo":"denisidoro/navi","slug":"navi-was-unable-to-call-tldr-make-sure-tldr-is-co","errorCode":null,"errorMessage":"navi was unable to call tldr.\nMake sure tldr is correctly installed.\n\nNote:\n{VERSION_DISCLAIMER}\n","messagePattern":"navi was unable to call tldr\\.\nMake sure tldr is correctly installed\\.\n\nNote:\n(.+?)\n","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"src/clients/tldr.rs","lineNumber":78,"sourceCode":"    let child = Command::new(\"tldr\")\n        .args(args)\n        .stdin(Stdio::piped())\n        .stdout(Stdio::piped())\n        .stderr(Stdio::piped())\n        .spawn();\n\n    let child = match child {\n        Ok(x) => x,\n        Err(_) => {\n            let msg = format!(\n                \"navi was unable to call tldr.\nMake sure tldr is correctly installed.\n\nNote:\n{VERSION_DISCLAIMER}\n\"\n            );\n            return Err(anyhow!(msg));\n        }\n    };\n\n    let out = child.wait_with_output().context(\"Failed to wait for tldr\")?;\n\n    if let Some(0) = out.status.code() {\n        let stdout = out.stdout;\n\n        let markdown = String::from_utf8(stdout).context(\"Output is invalid utf8\")?;\n        let lines = markdown_lines(query, &markdown);\n        Ok(lines)\n    } else {\n        let msg = format!(\n            \"Failed to call:\ntldr {}\n\nOutput:\n{}","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/denisidoro/navi/blob/f7330b9ad5bd95b7d1a3c96d00e0a77deb589147/src/clients/tldr.rs#L60-L96","documentation":"`clients::tldr::call` spawns a `tldr` client to fetch a tldr page. If the client binary cannot be spawned, navi returns an error noting that tldr must be installed, plus a VERSION_DISCLAIMER about which tldr clients/flags navi supports (the --markdown flag).","triggerScenarios":"`Command::new(\"tldr\")...spawn()` fails: no tldr client installed (tldr node client, tealdeer, etc.), binary not on PATH, or not executable.","commonSituations":"Minimal installs without any tldr client, users who installed tealdeer as `tealdeer` but not aliased/symlinked as `tldr`, PATH issues in non-interactive shells.","solutions":["Install a tldr client (npm install -g tldr, or cargo install tealdeer)","Ensure the binary is named/linked as `tldr` and on PATH (`which tldr`)","If using tealdeer, set the client.tealdeer config option in navi and ensure it supports the needed flags","Use a different cheatsheet source (local dir or cheat.sh) instead"],"exampleFix":"// before\n$ navi tldr tar\nError: navi was unable to call tldr.\n// after\n$ cargo install tealdeer && tldr --update\n$ which tldr\n~/.cargo/bin/tldr\n$ navi tldr tar","handlingStrategy":"validation","validationCode":"use std::process::Command;\nfn tldr_available() -> bool {\n    Command::new(\"tldr\").arg(\"--version\").output()\n        .map(|o| o.status.success()).unwrap_or(false)\n}\nif !tldr_available() {\n    eprintln!(\"install a tldr client (tealdeer or tldr npm package)\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match tldr::call(query, opts) {\n    Ok(lines) => render(lines),\n    Err(e) if e.to_string().contains(\"unable to call tldr\") => {\n        eprintln!(\"tldr client missing: install tealdeer or tldr and ensure it's on PATH\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Install a supported client and symlink it as `tldr`","Confirm `which tldr` resolves in non-interactive shells too","Prefer tealdeer with navi's client.tealdeer option","Run `tldr --update` after install"],"tags":["tldr","missing-binary","cheatsheet","network"],"backgroundTag":"missing-binary-dependency","analyzedSha":"f7330b9ad5bd95b7d1a3c96d00e0a77deb589147","analyzedAt":"2026-09-03T13:58:22.429Z","contentChangedAt":"2026-09-03T13:58:22.429Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}