jdx/mise · error · eyre::Report
brew is not available: {}
Error message
brew is not available: {} What it means
The brew import path first constructs a BrewManager and checks availability; if Homebrew is not usable on this Unix machine (missing binary, broken install), the import aborts with the manager's own unavailability reason. This is the Unix-side counterpart of the availability guard: importing requires brew to actually be queryable for linked formulae.
Source
Thrown at src/cli/system/import.rs:91
.system_packages
.managers
.as_ref()
.is_some_and(|enabled| !enabled.contains(&self.manager))
{
bail!(
"manager '{}' is excluded by the system_packages.managers setting",
self.manager
);
}
self.run_brew().await
}
#[cfg(unix)]
async fn run_brew(self) -> Result<()> {
debug_assert_eq!(self.manager, "brew");
let manager = brew::BrewManager::new();
if !manager.is_available() {
bail!("brew is not available: {}", manager.unavailable_reason());
}
let formulae = brew::linked_formulae(self.all)?;
if formulae.is_empty() {
info!("brew: no installed formulae to import");
return Ok(());
}
let path = resolve_target_config_path(ConfigPathOptions {
global: self.global,
path: self.path.clone(),
env: self.env.clone(),
cwd: None,
prefer_toml: true,
prevent_home_local: true,
})?;
let configured_taps = configured_brew_taps(&path).await?;
let config = Config::get().await?;View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Install Homebrew (/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") and ensure it is on PATH, then retry
- If brew is installed but not found, fix PATH in the shell/CI where mise runs (e.g. /home/linuxbrew/.linuxbrew/bin or /opt/homebrew/bin)
- If you did not mean to import from brew, check the manager argument you passed to `mise system import`
Example fix
# before mise system import brew # fails: brew not available # after eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" # or install brew mise system import brew
Defensive patterns
Strategy: validation
Validate before calling
# bash: require a working brew before import
command -v brew >/dev/null 2>&1 && brew --version >/dev/null 2>&1 || { echo "brew unavailable" >&2; exit 2; }
mise system import brew Prevention
- Install Homebrew in the image/machine before running imports; add its bin dir to PATH for non-interactive shells
- Skip gracefully in scripts: `command -v brew >/dev/null || exit 0`
When it happens
Trigger: Running `mise system import brew` on a Unix system where `brew` is not installed or not on PATH (manager.is_available() returns false, and unavailable_reason() supplies the detail).
Common situations: Fresh Linux box or container without Homebrew; CI images without brew; brew installed to a non-standard prefix/PATH not visible in non-interactive shells; broken brew install.
Related errors
- manager '{}' is excluded by the system_packages.managers set
- brew import is not supported on windows
- {name} is not available: {}
- manager '{}' is excluded by the system_packages.managers set
- brew is not available: {}
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/b217e7f23bf181b6.
Report an issue: GitHub.