{"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":"validation","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/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/mod.rs#L535-L571","documentation":"When installing a plugin from a local directory source, mise validates the source path before use. If the path does not exist on disk, validate_local_plugin_source bails with the displayed path, preventing a confusing failure later during clone/link of the plugin.","triggerScenarios":"`mise install` (or `mise plugin install name /path/to/plugin`) where the local source path passed for a plugin does not exist — typo'd path, deleted directory, path relative to the wrong working directory.","commonSituations":"Typo in a path in mise.toml or on the CLI; a plugin directory removed after being referenced in config; running the command from a different directory than where a relative path was intended to resolve.","solutions":["Check the path printed in the error and correct the typo or update the config to the actual plugin directory","Create/restore the plugin directory if it was deleted, or clone it from its origin first","Use an absolute path for local plugin sources to avoid working-directory ambiguity"],"exampleFix":"// before\nmise plugin install my-plugin ./pluginz/my-plugin\n// after\nmise plugin install my-plugin /home/me/plugins/my-plugin","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nif (!fs.existsSync(pluginDir) || !fs.statSync(pluginDir).isDirectory()) throw new Error(`Local plugin dir missing: ${pluginDir}`);","typeGuard":"function isExistingDir(p) { try { return fs.statSync(p).isDirectory(); } catch { return false; } }","tryCatchPattern":"try { await miseInstall(); } catch (e) { if (String(e).includes('local plugin directory does not exist')) { console.error('Fix or create the referenced plugin path:', e.message); } else throw e; }","preventionTips":["Use absolute paths for local plugin sources","Verify plugin paths exist after moving/cloning repos","Keep referenced plugin directories in version control or a setup script"],"tags":["plugin","filesystem","path","validation"],"backgroundTag":"directory-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}