{"record":{"id":"a34e73d863c479ba","repo":"jdx/mise","slug":"local-plugin-directory-does-not-exist","errorCode":null,"errorMessage":"local plugin directory does not exist: {}","messagePattern":"local plugin directory does not exist: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/mod.rs","lineNumber":553,"sourceCode":"    let path = PathBuf::from(repository);\n    let source = PluginSource::parse(repository);\n    if path.is_absolute() && path.is_dir() && matches!(&source, PluginSource::Zip { .. }) {\n        return Some(path);\n    }\n\n    match source {\n        PluginSource::Git {\n            url,\n            git_ref: None,\n            subdir: None,\n        } if url == repository => path.is_absolute().then_some(path),\n        _ => None,\n    }\n}\n\npub(crate) fn validate_local_plugin_source(source: &Path, plugin_path: &Path) -> Result<()> {\n    if !source.exists() {\n        bail!(\n            \"local plugin directory does not exist: {}\",\n            display_path(source)\n        );\n    }\n    if !source.is_dir() {\n        bail!(\n            \"local plugin source is not a directory: {}\",\n            display_path(source)\n        );\n    }\n    let resolved_source = file::desymlink_path(source);\n    let resolved_plugin_path = match (plugin_path.parent(), plugin_path.file_name()) {\n        (Some(parent), Some(file_name)) => file::desymlink_path(parent).join(file_name),\n        _ => plugin_path.to_path_buf(),\n    };\n    if resolved_source\n        .ancestors()\n        .any(|path| file::paths_eq(path, &resolved_plugin_path))","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/mod.rs#L535-L571","documentation":"When installing a plugin from a local directory (`mise plugin install <name> <path>`), mise validates the source before installing. If the supplied path does not exist on the filesystem, install is aborted with this error. It protects against typos silently creating broken plugin installs.","triggerScenarios":"Running `mise plugin install <name> ./path/to/plugin` (or `mise install` flows routed through validate_local_plugin_source) where `source.exists()` returns false — the directory was deleted, moved, never created, or the path is misspelled.","commonSituations":"Typo in the plugin directory path; a relative path given from the wrong working directory; the plugin was cloned to a different location or removed; using a path before cloning the plugin repo.","solutions":["Check the path exists: ls <path>; fix typos or cd to the correct directory before re-running the install.","Clone or restore the plugin repository to the expected directory first, then retry the install.","Use an absolute path to rule out working-directory-relative resolution problems."],"exampleFix":"// before\nmise plugin install node ./plgins/my-plugin   # typo: directory doesn't exist\n// after\nmise plugin install node ./plugins/my-plugin  # path exists","handlingStrategy":"validation","validationCode":"import std::path::Path;\nfn ensure_dir_exists(p: &Path) -> std::io::Result<()> {\n    if !p.exists() {\n        return Err(std::io::Error::new(std::io::ErrorKind::NotFound, format!(\"{} does not exist\", p.display())));\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match install_local_plugin(name, path) {\n    Err(e) if e.to_string().contains(\"does not exist\") => {\n        eprintln!(\"check the path: {}\", path.display());\n    }\n    r => r,\n}","preventionTips":["Use tab-completion or absolute paths when passing plugin directories.","Clone the plugin repo before attempting `mise plugin install <name> <path>`.","Run mise from the directory your relative paths are based on."],"tags":["filesystem","plugins","validation","path"],"backgroundTag":"file-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}