lima-vm/lima · info
%v
Error message
%v
What it means
Errors() aggregates per-file errors from downloads; entries that are ErrSkipped are filtered, and if remaining fatal errors exist they are errors.Join-ed. When ALL errors were just ErrSkipped (nothing fatally failed), it returns fmt.Errorf("%v", errs) — a non-wrapping message listing the skip reasons — because a joined sentinel could not be tested with errors.Is reliably.
Source
Thrown at pkg/fileutils/download.go:78
return "", fmt.Errorf("cache did not contain %#q: %w", f.Location, err)
}
return res.CachePath, nil
}
// Errors compose multiple into a single error.
// Errors filters out ErrSkipped.
func Errors(errs []error) error {
var finalErr error
for _, err := range errs {
if errors.Is(err, ErrSkipped) {
logrus.Debug(err)
} else {
finalErr = errors.Join(finalErr, err)
}
}
if len(errs) > 0 && finalErr == nil {
// errs only contains ErrSkipped
finalErr = fmt.Errorf("%v", errs)
}
return finalErr
}
View on GitHub (pinned to dd909d0973)
Solutions
- If this error is all skips, fix the file entries' arch fields so the needed file is actually downloaded
- Use the printed list of skip messages to identify which files/locations were skipped
- Filter ErrSkipped with errors.Is in your own aggregation if you compose errors similarly
- Treat this as informational when other applicable files downloaded successfully
Example fix
// before arch: "x86_64" # entry skipped on arm64 host // after arch: "aarch64" # entry now downloaded
Defensive patterns
Strategy: type-guard
Validate before calling
// ensure at least one file entry matches the current arch
hasMatch := false
for _, f := range files {
if f.Arch == runtimeArch { hasMatch = true }
}
if !hasMatch { return errors.New("no file entries match this architecture") } Type guard
func isSkipped(err error) bool { return errors.Is(err, fileutils.ErrSkipped) } Try / catch
err := fileutils.Errors(errs)
if err != nil {
if isSkipped(err) || strings.Contains(err.Error(), "skipped to download") {
log.Info("only skip notices: ", err)
return nil
}
return err
} Prevention
- Include correct-arch entries in multi-file templates
- Filter ErrSkipped when aggregating your own errors
- Log skip reasons but only fail on non-skip errors
When it happens
Trigger: Calling Errors (via EnsureNerdctlArchiveCache, EnsureFs, Prepare) after downloading multiple files where some or all were skipped (e.g. arch-mismatched entries) and no hard failures occurred.
Common situations: Multi-file templates where some files target other architectures; every file entry skipped, leaving only skip notices in the aggregated error text.
Related errors
- skipped to download
- cache did not contain %#q
- %w: %#q: unsupported arch: %#q
- failed to download %#q: %w
- cache did not contain %#q: %w
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/dad8ef6a82198ee2.
Report an issue: GitHub.