{"record":{"id":"c9bcdcf0177eacfc","repo":"BoundaryML/baml","slug":"selector-is-a-local-path-there-is-nothing-to-install-run","errorCode":null,"errorMessage":"{selector} is a local path; there is nothing to install.\nRun: baml toolchain use {selector}","messagePattern":"(.+?) is a local path; there is nothing to install\\.\nRun: baml toolchain use (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml/src/main.rs","lineNumber":1175,"sourceCode":"            !is_channel(selector)\n                || cache_path\n                    .metadata()\n                    .and_then(|metadata| metadata.modified())\n                    .ok()\n                    .and_then(|modified| SystemTime::now().duration_since(modified).ok())\n                    .is_some_and(|age| age <= CHANNEL_CACHE_TTL)\n        }\n    }\n}\n\nfn install_toolchain(\n    selector: &str,\n    activate_channel: bool,\n    override_url: Option<&str>,\n    force: bool,\n) -> Result<()> {\n    if is_path_selector(selector) {\n        return Err(anyhow!(\n            \"{selector} is a local path; there is nothing to install.\\nRun: baml toolchain use {selector}\"\n        ));\n    }\n    install_toolchain_with_policy(\n        selector,\n        activate_channel,\n        override_url,\n        force,\n        FetchPolicy::CacheAllowed,\n    )\n}\n\nfn install_toolchain_with_policy(\n    selector: &str,\n    activate_channel: bool,\n    override_url: Option<&str>,\n    force: bool,\n    policy: FetchPolicy,","sourceCodeStart":1157,"sourceCodeEnd":1193,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml/src/main.rs#L1157-L1193","documentation":"install_toolchain refuses a selector that looks like a local path (is_path_selector), because there is nothing to download or install for a local build. It directs the user to activate the path directly with `baml toolchain use`. This prevents nonsensical installs of filesystem paths.","triggerScenarios":"Running `baml toolchain install <selector>` (with activate_channel / override_url / force variants) where the selector matches the path-selector syntax (e.g. starts with ./, /, or contains path separators).","commonSituations":"Copy-pasting a local build path into `install` instead of `use`; scripting around local dev builds of the toolchain; misunderstanding that path selectors bypass the registry entirely.","solutions":["Use the activation command instead: `baml toolchain use <path>`.","If you meant to install a released version, pass a version or channel name (e.g. canary, nightly) instead of a path."],"exampleFix":"// before\nbaml toolchain install ./target/release/baml\n// after\nbaml toolchain use ./target/release/baml","handlingStrategy":"validation","validationCode":"if (selector.startsWith('/') || selector.startsWith('./') || selector.includes('/')) {\n  // it's a path selector: use `baml toolchain use <selector>` instead of install\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember: install is for released versions only; use is for activating anything including local paths.","In scripts, detect path-like selectors and route to `toolchain use`.","Keep local dev builds activated via `baml toolchain use`, not install."],"tags":["cli","toolchain","install"],"backgroundTag":"invalid-cli-argument","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}