{"record":{"id":"0ae0a762ca6a4220","repo":"nikivdev/code","slug":"flox-is-not-installed-install-it-from-https-flo","errorCode":null,"errorMessage":"flox is not installed. Install it from https://flox.dev/docs/install-flox/install/ and re-run `f doctor`.","messagePattern":"flox is not installed\\. Install it from https://flox\\.dev/docs/install-flox/install/ and re-run `f doctor`\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/doctor.rs","lineNumber":80,"sourceCode":"\n    if maybe_install_with_zerobrew(zerobrew_available, \"flox\", \"flox\")? {\n        if which::which(\"flox\").is_ok() {\n            println!(\"✅ flox installed via zerobrew\");\n            return Ok(());\n        }\n    }\n\n    // Heuristic: flox-managed env leaves a .flox directory or ~/.flox directory.\n    let home = home_dir();\n    if home.join(\".flox\").exists() {\n        println!(\n            \"✅ flox environment directory detected at {}\",\n            home.join(\".flox\").display()\n        );\n        return Ok(());\n    }\n\n    bail!(\n        \"flox is not installed. Install it from https://flox.dev/docs/install-flox/install/ and re-run `f doctor`.\"\n    );\n}\n\nfn ensure_jj_available(zerobrew_available: bool) -> Result<()> {\n    if which::which(\"jj\").is_ok() {\n        println!(\"✅ jj found on PATH\");\n        return Ok(());\n    }\n\n    if maybe_install_with_zerobrew(zerobrew_available, \"jj\", \"jj\")? {\n        if which::which(\"jj\").is_ok() {\n            println!(\"✅ jj installed via zerobrew\");\n            return Ok(());\n        }\n    }\n\n    vcs::ensure_jj_installed()?;","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/doctor.rs#L62-L98","documentation":"flow doctor checks that the flox environment manager is available. ensure_flox_available looks for the flox binary and/or a ~/.flox environment directory; if neither is found it aborts with a message pointing at the official install instructions.","triggerScenarios":"Running `f doctor`/`flow doctor` on a machine where the `flox` binary is not on PATH and ~/.flox does not exist (auto-install via zerobrew did not run or failed).","commonSituations":"New workstation without flox installed, flox installed via a method that did not put it on PATH, or HOME set to a location without the ~/.flox directory.","solutions":["Install flox per https://flox.dev/docs/install-flox/install/ and re-run `f doctor`","Ensure the flox binary directory is on your PATH","Confirm ~/.flox exists if you expect an environment directory rather than the binary"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if which::which(\"flox\").is_err() && !dirs::home_dir().unwrap().join(\".flox\").exists() {\n    eprintln!(\"Install flox from https://flox.dev/docs/install-flox/install/ first\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install flox as part of machine bootstrap","Keep flox on PATH in non-interactive shells too","Verify ~/.flox exists when relying on an environment directory"],"tags":["missing-binary","environment","doctor","dependency"],"backgroundTag":"dependency-not-installed","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}