Hmbown/CodeWhale · error · io::Error (InvalidInput)

built-in plugin path may not be a symbolic link or reparse…

Error message

built-in plugin path may not be a symbolic link or reparse point: {}

What it means

Generic guard reject_symlink in the built-in plugin writer, called by materialize_at_home and write_bundle. It symlinks-checks (symlink_metadata/reparse detection) any path it is about to create or write and refuses symbolic links or reparse points, mirroring the rule super::discovery applies when scanning a plugin root. Fires when something in the built-in plugin destination (e.g. ~/.local share plugin dir or a bundle path) is a link, which would redirect plugin writes outside the managed root; the path is shown in the message.

Solutions

  1. Delete the symlink/reparse point so the bundle can be materialized as real files
  2. Reinstall or repair the built-in plugin to recreate genuine directories
  3. Ensure installers and sync tools do not place junctions in the plugin root
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/plugins/builtin.rs:402 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/9bcf4bf7677efc7a. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/plugins/builtin.rs:402

            MOVEFILE_WRITE_THROUGH,
        )
    }
    .map_err(|_| io::Error::last_os_error())
}

#[cfg(not(any(target_os = "macos", target_os = "linux", windows)))]
fn publish_snapshot(_source: &Path, _destination: &Path) -> io::Result<()> {
    Err(io::Error::new(
        io::ErrorKind::Unsupported,
        "atomic built-in snapshot publication is unsupported on this platform",
    ))
}

/// Refuse to write through a symbolic link or reparse point, the same rule
/// [`super::discovery`] applies when it scans a plugin root.
fn reject_symlink(path: &Path) -> io::Result<()> {
    match fs::symlink_metadata(path) {
        Ok(metadata) if metadata_is_link_or_reparse(&metadata) => Err(io::Error::new(
            io::ErrorKind::InvalidInput,
            format!(
                "built-in plugin path may not be a symbolic link or reparse point: {}",
                path.display()
            ),
        )),
        Ok(_) => Ok(()),
        Err(error) if error.kind() == io::ErrorKind::NotFound => Ok(()),
        Err(error) => Err(error),
    }
}

#[cfg(test)]
#[path = "builtin_tests.rs"]
mod snapshot_tests;

#[cfg(test)]
mod tests {

View on GitHub (pinned to 433685b202)