jdx/mise · error
copy_link is not a symbolic link
Error message
copy_link is not a symbolic link: {} What it means
A configured copy_link must name an existing symbolic link within the source directory; mise materializes that exact link into the staged copy. This error means the path exists (symlink_metadata succeeded) but is a regular file, directory, or other non-link entry, so there is nothing to materialize as a link.
Solutions
- Recreate the entry as a symlink: `ln -sfn <target> <link-path>`
- Point copy_link at the actual symlink path, not its parent or a copy
- If the entry should be a regular file, remove it from copy_link (regular files are uploaded normally anyway)
- On symlink-less filesystems (some Windows checkouts), enable copy_links=true instead of per-link config
Example fix
# before: .claude is a regular directory copy_link = ".claude" # after: make it a symlink rm -rf .claude && ln -s ~/.claude .claude
Defensive patterns
Strategy: validation
Validate before calling
# the configured path must be a symlink within the source
[ -L "$SOURCE_DIR/$LINK_REL" ] || { echo "$LINK_REL is not a symlink"; exit 1; } Prevention
- Verify the target is still a symlink after git operations or checkouts on symlink-less filesystems
- Recreate links with `ln -sfn` when tooling replaces them with real files
- Drop copy_link entries for paths that became regular files
When it happens
Trigger: validate_copy_link_path finds source.join(link) via symlink_metadata and its file type is not a symlink; triggered from validate_copy_link/materialize_link during upload_source when host.copy_link is set.
Common situations: The path that used to be a symlink was replaced by a real file or directory (tooling checked it in as a regular file); the configured path points one level off (parent directory instead of the link itself); git checkout materialized the link as a plain file on a system without symlink support.
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
- copy_link cannot be nested below a symbolic link
- copy_link must be a relative path within the source
- agent ' ' `queue_directories` entry ' ' must be an absolute…
- an implied source entry key must be relative
- bootstrap compose project
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/e0359af0d141dda3.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:867
for component in link.parent().unwrap_or_else(|| Path::new("")).components() {
if let Component::Normal(component) = component {
parent.push(component);
let metadata = fs::symlink_metadata(&parent).wrap_err_with(|| {
format!("copy_link parent does not exist: {}", parent.display())
})?;
if metadata.file_type().is_symlink() {
bail!(
"copy_link cannot be nested below a symbolic link: {}",
link.display()
);
}
}
}
let path = source.join(link);
let metadata = fs::symlink_metadata(&path)
.wrap_err_with(|| format!("copy_link does not exist: {}", link.display()))?;
if !metadata.file_type().is_symlink() {
bail!("copy_link is not a symbolic link: {}", link.display());
}
Ok(())
}
fn materialize_link(source: &Path, staged_source: &Path, link: &Path) -> Result<()> {
validate_copy_link_path(staged_source, link)
.wrap_err_with(|| format!("staged copy_link is unsafe: {}", link.display()))?;
let source_link = source.join(link);
let staged_link = staged_source.join(link);
let target = fs::canonicalize(&source_link)
.wrap_err_with(|| format!("failed to resolve copy_link {}", link.display()))?;
let parent = staged_link
.parent()
.expect("a validated copy_link has a staged parent");
let original_permissions = make_directory_writable(parent)?;
let result = (|| {
crate::file::remove_file(&staged_link)?;
if target.is_dir() {View on GitHub (pinned to 533346cc37)