jdx/mise · error · eyre::Report

unexpected character: {}

Error message

unexpected character: {}

What it means

After parsing all artifacts, mise requires at least one installable artifact category to be non-empty (apps, binaries, command_wrappers, pkgs, installers, generic, fonts, completions, generated_completions). If the cask's artifacts list is empty or contains only ignored non-install kinds (caveats, depends_on, uninstall, zap, ...), there is nothing mise can install and it bails.

Source

Thrown at crates/aqua-registry/src/template.rs:182

                tokens.push(Token::Dot);
                code = &code[1..];
            }
        } else {
            // Check if it's an identifier (alphanumeric starting with letter)
            let end = code
                .chars()
                .enumerate()
                .find(|(_, c)| !c.is_alphanumeric() && *c != '_' && *c != '-')
                .map(|(i, _)| i)
                .unwrap_or(code.len());

            if end > 0 {
                let token_str = &code[..end];
                // Determine if this is a function or identifier based on context
                tokens.push(Token::Func(token_str));
                code = &code[end..];
            } else {
                bail!("unexpected character: {}", code.chars().next().unwrap());
            }
        }
    }
    Ok(tokens)
}

fn dotted_identifier_end(code: &str) -> Option<usize> {
    let rest = code.strip_prefix('.')?;
    let first = rest.chars().next()?;
    if !first.is_alphabetic() {
        return None;
    }
    Some(1 + identifier_len(rest))
}

fn identifier_len(code: &str) -> usize {
    code.char_indices()
        .find(|(_, c)| !c.is_alphanumeric() && *c != '_')

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Inspect the cask's JSON (brew info --cask=v2 --json <token>) to see what artifacts it actually declares
  2. Update mise in case the artifact shape is newly supported
  3. Clear the cached Homebrew API data and retry so fresh metadata is fetched
  4. Install the cask with upstream brew and report the token to mise
Defensive patterns

Strategy: validation

Validate before calling

let has_payload = cask.artifacts.iter().any(|a| {
    let k = artifact_type(a);
    matches!(k.as_str(), "app" | "binary" | "pkg" | "installer" | "generic_artifact" | "font" | "completion")
});
if !has_payload { /* skip this cask before install */ }

Prevention

When it happens

Trigger: A cask whose JSON artifacts array is empty; a cask defined purely by metadata (conflicts_with/depends_on/uninstall) with no real payload; API responses where artifacts live under a key mise reads differently.

Common situations: Metadata-only or 'skip' style casks; casks whose entire payload is an unsupported stanza that was silently ignored rather than bailed; corrupt API cache.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/7ef6c03e01ec76cd. Report an issue: GitHub.