jdx/mise · error
local plugin source cannot contain, be, or be inside the…
Error message
local plugin source cannot contain, be, or be inside the plugin install path: {} What it means
After resolving the local plugin source and the plugin install path, mise rejects a source that would overlap the installation target: the source must not be the install path, inside it, or contain it. Installing from such a path would recursively copy/link a directory into itself, so the check compares both paths and their ancestors with `file::paths_eq` and bails.
Solutions
- Move the plugin source outside the mise install path (e.g. a repo checkout under ~/src) and install from there.
- If the plugin already lives where it should, use `mise plugin link <name> <path>` instead of installing/copying.
- Check for symlink loops: resolve real paths of both the source and `~/.local/share/mise/plugins` and ensure neither contains the other.
Example fix
// before mise plugin add myplugin ~/.local/share/mise/plugins/myplugin-src // after git clone https://github.com/user/myplugin ~/src/myplugin mise plugin add myplugin ~/src/myplugin
Defensive patterns
Strategy: validation
Validate before calling
const real = p => require('fs').realpathSync(p);
const install = real(require('os').homedir() + '/.local/share/mise/plugins/' + name);
if (real(src).startsWith(install) || install.startsWith(real(src)))
throw new Error('plugin source overlaps install path'); Prevention
- Keep plugin sources in a separate location (~/src, ~/plugins) away from ~/.local/share/mise.
- Use `mise plugin link` for plugins you manage in place instead of copying from within the data dir.
When it happens
Trigger: Running `mise plugin add <name> <path>` where `<path>` equals, is a parent of, or is nested inside the plugin install directory (`~/.local/share/mise/plugins/<name>`), including after `desymlink_path` resolution.
Common situations: Passing the mise data/plugins directory itself (or `~/.local/share/mise`) as the source; creating a plugin inside the plugins dir and then trying to 'install' it from there; symlinked home directories making a source path resolve under the install path.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- local plugin directory does not exist
- local plugin source is not a directory
- a parent directory is now a symlink; left untouched
- app Info.plist must be a regular file
- app target is outside an allowed Applications directory
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/6ea2d21c1781ed64.
Report an issue: GitHub.
Appendix: source
Thrown at src/plugins/mod.rs:576
if !source.is_dir() {
bail!(
"local plugin source is not a directory: {}",
display_path(source)
);
}
let resolved_source = file::desymlink_path(source);
let resolved_plugin_path = match (plugin_path.parent(), plugin_path.file_name()) {
(Some(parent), Some(file_name)) => file::desymlink_path(parent).join(file_name),
_ => plugin_path.to_path_buf(),
};
if resolved_source
.ancestors()
.any(|path| file::paths_eq(path, &resolved_plugin_path))
|| resolved_plugin_path
.ancestors()
.any(|path| file::paths_eq(path, &resolved_source))
{
bail!(
"local plugin source cannot contain, be, or be inside the plugin install path: {}",
display_path(source)
);
}
Ok(())
}
pub(crate) fn install_local_plugin_source(
plugin_path: &Path,
source: &Path,
pr: &dyn SingleReport,
) -> Result<()> {
let parent = plugin_path.parent().ok_or_else(|| {
eyre!(
"plugin install path has no parent: {}",
display_path(plugin_path)
)
})?;View on GitHub (pinned to 533346cc37)