{"record":{"id":"4156856cb2f514b5","repo":"nikivdev/code","slug":"flox-not-found-on-path","errorCode":null,"errorMessage":"flox not found on PATH","messagePattern":"flox not found on PATH","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":470,"sourceCode":"    }\n\n    if let Err(err) = flox_env_ok(&flox_bin, root) {\n        bail!(\"flox env still invalid after reset: {err}\");\n    }\n    Ok(())\n}\n\nfn resolve_flox_bin() -> Result<PathBuf> {\n    if let Ok(path) = env::var(\"FLOX_BIN\") {\n        let bin = PathBuf::from(path);\n        if bin.exists() {\n            return Ok(bin);\n        }\n    }\n    if let Ok(path) = which::which(\"flox\") {\n        return Ok(path);\n    }\n    bail!(\"flox not found on PATH\")\n}\n\nfn flox_run(flox_bin: &Path, args: &[String]) -> Result<()> {\n    let status = std::process::Command::new(flox_bin)\n        .args(args)\n        .status()\n        .with_context(|| format!(\"failed to run flox {}\", args.join(\" \")))?;\n    if !status.success() {\n        bail!(\"flox {} failed\", args.join(\" \"));\n    }\n    Ok(())\n}\n\nfn flox_env_ok(flox_bin: &Path, root: &Path) -> Result<()> {\n    let output = std::process::Command::new(flox_bin)\n        .arg(\"activate\")\n        .arg(\"-d\")\n        .arg(root)","sourceCodeStart":452,"sourceCodeEnd":488,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/install.rs#L452-L488","documentation":"Error \"flox not found on PATH\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/install.rs:470 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}