abiosoft/colima · error

error checking Lima version: %w

Error message

error checking Lima version: %w

What it means

LimaVersionSupported runs 'limactl info' via cli.Command with stdout captured into a buffer; if the command cannot start or exits non-zero, the error is wrapped as 'error checking Lima version'. The most common root cause is limactl missing from PATH because Lima is not installed or the brew prefix is absent from the environment.

Source

Thrown at core/core.go:55

	// validate binfmt
	if err := guest.RunQuiet("command", "-v", "binfmt"); err != nil {
		return fmt.Errorf("binfmt not found: %w", err)
	}

	return install()
}

// LimaVersionSupported checks if the currently installed Lima version is supported.
func LimaVersionSupported() error {
	var values struct {
		Version string `json:"version"`
	}
	var buf bytes.Buffer
	cmd := cli.Command("limactl", "info")
	cmd.Stdout = &buf

	if err := cmd.Run(); err != nil {
		return fmt.Errorf("error checking Lima version: %w", err)
	}

	if err := json.NewDecoder(&buf).Decode(&values); err != nil {
		return fmt.Errorf("error decoding 'limactl info' json: %w", err)
	}
	// remove pre-release hyphen
	parts := strings.SplitN(values.Version, "-", 2)
	if len(parts) > 0 {
		values.Version = parts[0]
	}

	if parts[0] == "HEAD" {
		logrus.Warnf("to avoid compatibility issues, ensure lima development version (%s) in use is not lower than %s", values.Version, limaVersion)
		return nil
	}

	min := semver.New(strings.TrimPrefix(limaVersion, "v"))
	current, err := semver.NewVersion(strings.TrimPrefix(values.Version, "v"))

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Confirm 'limactl info' runs in the same shell colima is invoked from; if not found, brew install lima
  2. Reinstall colima via brew so the lima dependency is restored: brew reinstall colima
  3. Ensure PATH includes the brew prefix: eval "$(brew shellenv)" in the invoking shell or service unit
  4. If limactl exists but errors, run 'limactl info' directly and fix or reinstall Lima

Example fix

# before
limactl info   # command not found
colima start   # error checking Lima version

# after
brew install lima && colima start
Defensive patterns

Strategy: validation

Validate before calling

if _, err := exec.LookPath("limactl"); err != nil {
    // Lima missing: brew install lima, or fix PATH, before starting colima
}
out, err := exec.Command("limactl", "info").Output()
if err != nil {
    // limactl present but broken: reinstall Lima
}

Try / catch

if err := core.LimaVersionSupported(); err != nil {
    if strings.Contains(err.Error(), "error checking Lima version") {
        // limactl missing or failing: verify PATH and 'limactl info' by hand
    }
}

Prevention

When it happens

Trigger: Starting colima when limactl is not in $PATH (Lima uninstalled, broken brew linkage, or a service/IDE context without the brew bin directory), or when limactl exists but 'limactl info' exits non-zero due to a broken Lima installation.

Common situations: Source installs of colima without lima; brew upgrade unlinking limactl; IDE terminals, launchd, or brew services where PATH lacks /opt/homebrew/bin; corrupted Lima config directory.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/f5e0a9a6a961d7e8. Report an issue: GitHub.