jdx/mise · error

the packslip names an executable

Error message

the packslip names an executable {:?}, which is not a plain file name

What it means

When linking executables declared in a packslip artifact into the bins directory, mise validates each bin.name is a plain file name (no path separators or special components). A bin name that isn't a plain file name is rejected rather than linked.

Solutions

  1. Fix the packslip manifest: move the directory portion of the value into bin.path and keep bin.name as a bare file name
  2. Ask the vendor to correct the manifest and republish
  3. Use a different version of the tool whose manifest is well-formed

Example fix

// before (manifest)
[[bin]]
name = 'bin/rg'
path = 'rg'
// after
[[bin]]
name = 'rg'
path = 'bin/rg'
Defensive patterns

Strategy: validation

Validate before calling

// validate bin entries in the manifest before publishing
for bin in &manifest.bin {
    assert!(!bin.name.contains('/') && bin.name != ".." && !bin.name.is_empty(), "bin.name must be a plain file name: {}", bin.name);
}

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: link_bins iterates artifact.bin and file::is_plain_file_name(&bin.name) fails — the manifest's bin name contains '/', '..' or other path-like components.

Common situations: A vendor manifest mistakenly puts a relative path in bin.name instead of bin.path; a malicious manifest attempting path traversal via the executable name.

Understand the failure class

Background: Path traversal blocked: "path escapes the workspace" and "outside site root" errors when a path will not stay inside its allowed directory — this error's family across 26 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/3969102b4aa3eff0. Report an issue: GitHub.

Appendix: source

Thrown at src/backend/packslip.rs:1062

                "packslip:{project}: {} of {before} version(s) carry a stamp",
                versions.len()
            );
        }
        Ok(versions)
    }

    /// Put every executable the packslip names into the install's bin dir
    /// under the name it should have on PATH.
    fn link_bins(tv: &ToolVersion, artifact: &Artifact) -> Result<()> {
        if artifact.bin.is_empty() {
            return Ok(());
        }
        let install_path = tv.install_path();
        let bins_dir = install_path.join(MISE_BINS_DIR);
        file::create_dir_all(&bins_dir)?;
        for bin in &artifact.bin {
            if !file::is_plain_file_name(&bin.name) {
                bail!(
                    "the packslip names an executable {:?}, which is not a plain file name",
                    bin.name
                );
            }
            let Some(src) = locate_in_install(&install_path, &bin.path) else {
                bail!(
                    "the packslip lists executable {} in {}, but the archive holds no such file",
                    bin.path,
                    artifact.name
                );
            };
            file::make_executable(&src)?;
            let dst = bin_link_path(&bins_dir, &bin.name);
            if dst.exists() || dst.is_symlink() {
                file::remove_all(&dst)?;
            }
            file::make_symlink_or_copy(&src, &dst)?;
        }

View on GitHub (pinned to 533346cc37)