abiosoft/colima · error
invalid downloader %q: must be one of %s, %s
Error message
invalid downloader %q: must be one of %s, %s
What it means
ValidateDownloader normalizes the downloader choice case-insensitively and accepts exactly two values: DownloaderNative ('native', the Go built-in) and DownloaderCurl ('curl'). Anything else — 'wget', 'curl' with trailing whitespace, or the empty string — reaches the default branch and is rejected, quoting both the offending value and the allowed set.
Source
Thrown at util/downloader/curl.go:31
const (
// DownloaderNative uses Go's native HTTP client
DownloaderNative = "native"
// DownloaderCurl uses the curl command (honors .curlrc)
DownloaderCurl = "curl"
envDownloader = "COLIMA_DOWNLOADER"
)
// ValidateDownloader validates the downloader value (case-insensitive).
// Returns the normalized value or an error if invalid.
func ValidateDownloader(v string) (string, error) {
switch strings.ToLower(v) {
case DownloaderNative:
return DownloaderNative, nil
case DownloaderCurl:
return DownloaderCurl, nil
default:
return "", fmt.Errorf("invalid downloader %q: must be one of %s, %s", v, DownloaderNative, DownloaderCurl)
}
}
// curlDownloader handles downloads using the curl command
type curlDownloader struct{}
// Download downloads a file using curl
func (c *curlDownloader) Download(r Request, destPath string) error {
// check if curl is available
if _, err := exec.LookPath("curl"); err != nil {
return fmt.Errorf("curl not found in PATH: %w", err)
}
args := []string{
"-fSL", // fail on HTTP errors, show errors, follow redirects
"-C", "-", // resume if possible (auto-detect offset)
"--progress-bar", // show progress bar
"-o", destPath, // output fileView on GitHub (pinned to c3a5f9184d)
Solutions
- Set the value to exactly 'native' or 'curl' (any casing)
- Unset COLIMA_DOWNLOADER entirely to use the built-in default
- Inspect for hidden characters: printf '%s' "$COLIMA_DOWNLOADER" | od -c
Defensive patterns
Strategy: validation
Type guard
func isValidDownloader(v string) bool {
_, err := ValidateDownloader(strings.TrimSpace(v))
return err == nil
} Prevention
- Validate env-derived settings once at process start
- Trim whitespace before validating user-supplied config values
- Prefer 'native' — it has no external dependency
When it happens
Trigger: COLIMA_DOWNLOADER is set to an unsupported value (e.g. wget) or a downloader flag carries a typo, and any colima code path that downloads artifacts runs.
Common situations: Copy-pasted environment snippets from tutorials suggesting wget; trailing whitespace or quotes inside env values; stale values from older versions.
Related errors
- curl not found in PATH: %w
- unknown runner type: %s (valid options: docker, ramalama)
- 'colima model' requires docker runtime, current runtime is %
- error loading instance config: %w
- 'colima model' requires krunkit VM type for GPU access, curr
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/1f0358c2b90d0fda.
Report an issue: GitHub.