jdx/mise · error

artifactbundle_asset must end with .artifactbundle.zip, got

Error message

artifactbundle_asset must end with .artifactbundle.zip, got {name}

What it means

When the user pins a specific artifact bundle via the artifactbundle_asset option, select_artifactbundle_asset validates the name format. A custom asset name must end with .artifactbundle.zip (the SwiftPM artifact bundle zip convention); anything else is rejected as invalid configuration.

Solutions

  1. Set artifactbundle_asset to the exact release asset name ending in .artifactbundle.zip
  2. Copy the asset name verbatim from the release's assets page
  3. Remove artifactbundle_asset to let mise auto-select among bundles

Example fix

// before (mise.toml)
[tools.swiftlint]
version = '0.54.0'
artifactbundle_asset = 'swiftlint-macos.zip'
// after
[tools.swiftlint]
version = '0.54.0'
artifactbundle_asset = 'swiftlint.artifactbundle.zip'
Defensive patterns

Strategy: validation

Validate before calling

// validate the configured name before install
name="$ARTIFACTBUNDLE_ASSET"; case "$name" in *.artifactbundle.zip) :;; *) echo "invalid: $name";; esac

Prevention

When it happens

Trigger: resolve_artifactbundle_asset calls select_artifactbundle_asset with opts.artifactbundle_asset(None) returning Some(name) where is_artifactbundle_zip(&name) is false — e.g. artifactbundle_asset = 'swiftlint.zip' or 'bundle.artifactbundle'.

Common situations: Typo in the configured asset name, using the unzipped bundle name, or pointing at a checksum/other release asset instead of the bundle zip.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/backend/spm.rs:929

                        })
                        .collect()
                })
        }
    };
    let Some(assets) = assets else {
        return Ok(None);
    };
    select_artifactbundle_asset(assets, opts)
}

fn select_artifactbundle_asset(
    assets: Vec<ArtifactBundleReleaseAsset>,
    opts: &SpmOptions<'_>,
) -> eyre::Result<Option<ArtifactBundleReleaseAsset>> {
    let artifactbundle_asset = opts.artifactbundle_asset(None);
    if let Some(name) = artifactbundle_asset {
        if !is_artifactbundle_zip(&name) {
            bail!("artifactbundle_asset must end with .artifactbundle.zip, got {name}");
        }
        return assets
            .into_iter()
            .find(|a| a.name == name)
            .map(Some)
            .ok_or_else(|| {
                eyre::eyre!("artifactbundle_asset not found in release assets: {name}")
            });
    }

    let candidates = assets
        .into_iter()
        .filter(|a| is_artifactbundle_zip(&a.name))
        .collect::<Vec<_>>();
    match candidates.len() {
        0 => Ok(None),
        1 => Ok(candidates.into_iter().next()),
        _ => bail!(

View on GitHub (pinned to 533346cc37)