{"record":{"id":"c11af76be25808e8","repo":"nikivdev/code","slug":"lin-is-not-on-path-build-install-from-this-repo","errorCode":null,"errorMessage":"lin is not on PATH. Build/install from this repo (scripts/deploy.sh) so flow can delegate watchers to it.","messagePattern":"lin is not on PATH\\. Build/install from this repo \\(scripts/deploy\\.sh\\) so flow can delegate watchers to it\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/doctor.rs","lineNumber":31,"sourceCode":"use crate::vcs;\n\n/// Ensure the lin watcher daemon is available, prompting to install a bundled\n/// copy if it is missing from PATH. Returns the resolved binary path.\npub fn ensure_lin_available_interactive() -> Result<PathBuf> {\n    if let Ok(path) = which::which(\"lin\") {\n        println!(\"✅ lin watcher daemon found at {}\", path.display());\n        return Ok(path);\n    }\n\n    if let Some(bundled) = find_bundled_lin() {\n        if prompt_install_lin(&bundled)? {\n            let installed = install_lin(&bundled)?;\n            println!(\"✅ Installed lin to {}\", installed.display());\n            return Ok(installed);\n        }\n    }\n\n    bail!(\n        \"lin is not on PATH. Build/install from this repo (scripts/deploy.sh) so flow can delegate watchers to it.\"\n    );\n}\n\npub fn run(_opts: DoctorOpts) -> Result<()> {\n    println!(\"Running flow doctor checks...\\n\");\n\n    let zerobrew_available = ensure_zerobrew_available_interactive()?;\n\n    ensure_flox_available(zerobrew_available)?;\n    ensure_jj_available(zerobrew_available)?;\n    let _ = ensure_lin_available_interactive();\n    ensure_direnv_on_path(zerobrew_available)?;\n\n    match detect_shell()? {\n        Some(shell) => ensure_shell_hook(shell)?,\n        None => println!(\n            \"⚠️  Unable to detect your shell from $SHELL. Add the direnv hook manually (see https://direnv.net).\"","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/doctor.rs#L13-L49","documentation":"flow delegates file-watching to a companion binary called `lin`. ensure_lin_available_interactive tries to find `lin` on PATH (and offers to install a bundled copy); if nothing is found and installation did not succeed, it aborts with this message telling you to build/install from the repo.","triggerScenarios":"Running `flow doctor` (or any flow command that calls ensure_lin_available_interactive) when `lin` is not on PATH and the bundled auto-install path was skipped or failed.","commonSituations":"Fresh machine where scripts/deploy.sh was never run, lin built but its bin dir not added to PATH, or lin removed after a cleanup.","solutions":["Run scripts/deploy.sh from this repo to build and install lin","Install the bundled copy when the doctor prompts to install lin","Add the directory containing the lin binary to your PATH"],"exampleFix":"// shell\n// before\n$ which lin  # not found\n// after\n$ ./scripts/deploy.sh\n$ which lin  # /usr/local/bin/lin","handlingStrategy":"validation","validationCode":"if which::which(\"lin\").is_err() {\n    eprintln!(\"lin missing; run scripts/deploy.sh before flow commands\");\n}","typeGuard":null,"tryCatchPattern":"match flow::doctor::ensure_lin_available_interactive() {\n    Err(e) if e.to_string().contains(\"lin is not on PATH\") => {\n        eprintln!(\"Run `./scripts/deploy.sh` to build/install lin, then retry.\");\n    }\n    Err(e) => return Err(e),\n    Ok(_) => {}\n}","preventionTips":["Run scripts/deploy.sh on every new machine","Add lin's install directory to PATH in your shell profile","Re-check after upgrading or cleaning your toolchain"],"tags":["missing-binary","path","doctor","environment"],"backgroundTag":"binary-not-on-path","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}