nikivdev/code · error · anyhow::Error
lin is not on PATH. Build/install from this repo (scripts/de
Error message
lin is not on PATH. Build/install from this repo (scripts/deploy.sh) so flow can delegate watchers to it.
What it means
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.
Source
Thrown at src/doctor.rs:31
use crate::vcs;
/// Ensure the lin watcher daemon is available, prompting to install a bundled
/// copy if it is missing from PATH. Returns the resolved binary path.
pub fn ensure_lin_available_interactive() -> Result<PathBuf> {
if let Ok(path) = which::which("lin") {
println!("✅ lin watcher daemon found at {}", path.display());
return Ok(path);
}
if let Some(bundled) = find_bundled_lin() {
if prompt_install_lin(&bundled)? {
let installed = install_lin(&bundled)?;
println!("✅ Installed lin to {}", installed.display());
return Ok(installed);
}
}
bail!(
"lin is not on PATH. Build/install from this repo (scripts/deploy.sh) so flow can delegate watchers to it."
);
}
pub fn run(_opts: DoctorOpts) -> Result<()> {
println!("Running flow doctor checks...\n");
let zerobrew_available = ensure_zerobrew_available_interactive()?;
ensure_flox_available(zerobrew_available)?;
ensure_jj_available(zerobrew_available)?;
let _ = ensure_lin_available_interactive();
ensure_direnv_on_path(zerobrew_available)?;
match detect_shell()? {
Some(shell) => ensure_shell_hook(shell)?,
None => println!(
"⚠️ Unable to detect your shell from $SHELL. Add the direnv hook manually (see https://direnv.net)."View on GitHub (pinned to a747e741ae)
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
Example fix
// shell // before $ which lin # not found // after $ ./scripts/deploy.sh $ which lin # /usr/local/bin/lin
Defensive patterns
Strategy: validation
Validate before calling
if which::which("lin").is_err() {
eprintln!("lin missing; run scripts/deploy.sh before flow commands");
} Try / catch
match flow::doctor::ensure_lin_available_interactive() {
Err(e) if e.to_string().contains("lin is not on PATH") => {
eprintln!("Run `./scripts/deploy.sh` to build/install lin, then retry.");
}
Err(e) => return Err(e),
Ok(_) => {}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- flox is not installed. Install it from https://flox.dev/docs
- direnv is not on PATH. Install it from https://direnv.net/#i
- handled before project context load
- ai not found in PATH
- jj is required but not available on PATH
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/c11af76be25808e8.
Report an issue: GitHub.