jdx/mise · error
Unknown config file type: {}
Error message
Unknown config file type: {} What it means
Raised by shim_unsupported! in mise's Homebrew cask shim (src/system/packages/brew/cask_shim.rb). mise evaluates cask definitions with a minimal Ruby DSL reimplementation instead of real Homebrew; any cask stanza or method the shim does not implement (reached directly, or via method_missing at line 359-361) raises ShimUnsupportedError with the feature name. It is a deliberate fail-loud guard: the shim would rather abort than silently skip an install step like sudo moves, system_command side effects, or OS-version conditionals it cannot evaluate.
Source
Thrown at src/config/config_file/mod.rs:279
if runtimes.iter().any(|r| r.tvr.is_none()) {
return Err(eyre!(
"invalid input, specify a version for each tool. Or just specify one tool to print the current version"
));
}
Ok(false)
}
}
async fn init(path: &Path) -> Arc<dyn ConfigFile> {
match detect_config_file_type(path).await {
Some(ConfigFileType::MiseToml) => Arc::new(MiseToml::init(path)),
Some(ConfigFileType::ToolVersions) => Arc::new(ToolVersions::init(path)),
Some(ConfigFileType::IdiomaticVersion(backends)) => Arc::new(
IdiomaticVersionFile::parse(path.to_path_buf(), backends)
.await
.expect("failed to parse idiomatic version file"),
),
_ => panic!("Unknown config file type: {}", path.display()),
}
}
pub async fn parse_or_init(path: &Path) -> eyre::Result<Arc<dyn ConfigFile>> {
let path = if path.is_dir() {
path.join(&*env::MISE_DEFAULT_CONFIG_FILENAME)
} else {
path.into()
};
let cf = match path.exists() {
true => parse(&path).await?,
false => init(&path).await,
};
Ok(cf)
}
/// Lock a config file for a read-modify-write operation, then read its latest contents.
///View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Install that cask with real Homebrew instead (brew install --cask <token>) and keep mise managing only formula-level tools
- Update mise to the latest release — shim coverage for cask DSL grows over time — then retry
- If the cask needs elevation, set system_packages.sudo = "interactive" (or "noninteractive") so the shim can elevate instead of failing
- Check the feature name in the message against cask_shim.rb to see which stanza is unsupported, and report it as a mise issue with the cask token
- Pin a different version of the app whose cask uses only supported stanzas (app/binary/zap, on_<version> blocks with plain/:or_older/:or_newer)
Example fix
# before: cask uses a stanza the shim cannot run # .rb definition: system_command "/usr/bin/tccutil", args: ["--reset", "Camera"] mise x -- brew-installed-cask # fails: cask uses `system_command ...` # after: let real Homebrew handle it brew install --cask <token>
Defensive patterns
Strategy: fallback
Validate before calling
# heuristic pre-check: does the cask use stanzas the shim lacks? brew cat --cask <token> 2>/dev/null | grep -nE 'system_command|on_[a-z_]+ +:[a-z_]+|livecheck|uninstall_early' && \ echo "likely unsupported by mise cask shim -> use real brew"
Type guard
def shim_supported_cask?(path)
src = File.read(path)
unsupported = [/system_command\s+.*,(?!.*argv)/, /on_\w+\s+:((?!or_older|or_newer)\w+)/]
unsupported.none? { |re| re.match?(src) }
end Try / catch
If you embed the shim: begin ... rescue ShimUnsupportedError => e; warn e.message; fall back to shelling out to `brew install --cask <token>`; end — never rescue-and-continue as if the cask installed.
Prevention
- Route complex/GUI casks through real Homebrew; reserve mise system packages for simple casks (app/binary stanzas)
- Keep mise current so shim DSL coverage tracks Homebrew changes
- Set system_packages.sudo explicitly if your casks need elevation, instead of relying on the default deny
When it happens
Trigger: Running mise's brew cask installation path (system packages) on a cask that uses: system_command with extra keyword keys (line 324), an unrecognized DSL method (method_missing, line 359), an on_system_conditional missing its version key (line 271), or an unsupported on_<macos_version> method form (line 392, e.g. anything besides plain/:or_older/:or_newer).
Common situations: Installing a GUI app cask whose Ruby definition uses newer or rarely-used Homebrew DSL; casks needing sudo with system_packages.sudo = "deny" (default); upstream cask updated to use a stanza mise's shim has not covered yet after a Homebrew bump; pinning to a cask version that relied on install-time helpers.
Related errors
- failed to parse registry option {k} as a TOML value: {e}
- brew-cask is not available: {}
- brew is not available: {}
- brew-cask:{}: dependency cycle detected
- brew-cask:{}: Homebrew owns this cask; remove it with Homebr
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/5b7c4ee68a37fa3e.
Report an issue: GitHub.