jdx/mise · error · eyre::Report
brew-cask: binary $APPDIR target
Error message
brew-cask: binary $APPDIR target '{target_name}' must stay below Applications What it means
Error "brew-cask: binary $APPDIR target '{target_name}' must stay below Applications" thrown in jdx/mise.
Solutions
- Adjust the $APPDIR binary target so it resolves to a location below the Applications directory.
- Rename the binary target or fix APPDIR so the expanded path stays under Applications.
When it happens
Trigger: Thrown at src/system/packages/brew/cask.rs:6339 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/706d53bd75e6f42e.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask.rs:6339
roots
.iter()
.map(|root| root.display().to_string())
.collect::<Vec<_>>()
.join(" or ")
}
fn binary_target_path(target_name: &str, appdir: &Path) -> Result<PathBuf> {
if target_name.contains('\0') {
bail!("brew-cask: binary target contains NUL");
}
if let Some(relative) = target_name.strip_prefix("$APPDIR/") {
let relative = Path::new(relative);
if relative.components().next().is_none()
|| relative
.components()
.any(|component| !matches!(component, Component::Normal(_)))
{
bail!("brew-cask: binary $APPDIR target '{target_name}' must stay below Applications");
}
if !allowed_appdir_roots()?.iter().any(|root| root == appdir) {
bail!("brew-cask: invalid appdir '{}'", appdir.display());
}
return Ok(appdir.join(relative));
}
if target_name.contains("$APPDIR") {
bail!("brew-cask: $APPDIR must prefix a binary target");
}
let prefix = prefix::prefix();
let prefix_str = prefix.to_string_lossy();
let target_name = target_name.replace("$HOMEBREW_PREFIX", prefix_str.as_ref());
let path = PathBuf::from(&target_name);
let target = if path.is_absolute() {
path
} else if target_name.contains('/') {
prefix.join(path)
} else {View on GitHub (pinned to 6f52dcdf99)