abiosoft/colima · error
error reading embedded file: %w
Error message
error reading embedded file: %w
What it means
Fatal error in `colima template`'s RunE when embedded.ReadString('defaults/abort.yaml') cannot read the abort header from the go:embed filesystem baked into the binary. Unlike the start --edit path (which only warns), the template command aborts. The embedded FS cannot fail at runtime for official binaries, so this indicates a broken or nonstandard build.
Source
Thrown at cmd/template.go:33
// templateCmd represents the template command
var templateCmd = &cobra.Command{
Use: "template",
Aliases: []string{"tmpl", "tpl", "t"},
Short: "edit the template for default configurations",
Long: `Edit the template for default configurations of new instances.
`,
RunE: func(cmd *cobra.Command, args []string) error {
if templateCmdArgs.Print {
fmt.Println(templateFile())
return nil
}
// there are unwarranted []byte to string overheads.
// not a big deal in this case
abort, err := embedded.ReadString("defaults/abort.yaml")
if err != nil {
return fmt.Errorf("error reading embedded file: %w", err)
}
info, err := embedded.ReadString("defaults/template.yaml")
if err != nil {
return fmt.Errorf("error reading embedded file: %w", err)
}
template, err := templateFileOrDefault()
if err != nil {
return fmt.Errorf("error reading template file: %w", err)
}
tmpFile, err := waitForUserEdit(templateCmdArgs.Editor, []byte(abort+"\n"+info+"\n"+template))
if err != nil {
return fmt.Errorf("error editing template file: %w", err)
}
if tmpFile == "" {
return fmt.Errorf("empty file, template edit aborted")
}
defer func() {View on GitHub (pinned to c3a5f9184d)
Solutions
- Reinstall colima from an official channel (brew, Nix, release binaries) to rule out a bad build
- If building from source, ensure embedded/defaults/abort.yaml exists relative to the //go:embed directive in embedded/embed.go, then rebuild
Defensive patterns
Strategy: fallback
Prevention
- Use official binaries; embedded assets only break in custom builds
- Verify custom builds by running `colima template --print`-adjacent smoke tests before distributing
When it happens
Trigger: Running `colima template` with a binary compiled from a tree where embedded/defaults/abort.yaml was removed/renamed without updating //go:embed; a corrupted binary. Not reproducible via user config.
Common situations: Local developer builds after moving embedded assets; third-party repackaged colima binaries.
Related errors
- error reading template file: %w
- unable to read embedded file: %w
- error parsing incus config template: %w
- error applying nerdctl script template: %w
- error editing template file: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/fb7392ee9b20c38d.
Report an issue: GitHub.