lima-vm/lima · error
--verbatim cannot be used with any of --embed, --embed-all,
Error message
--verbatim cannot be used with any of --embed, --embed-all, or --fill
What it means
`limactl copy`/template copy modes are mutually exclusive: --verbatim outputs the template exactly as-is, while --embed, --embed-all, and --fill resolve and inline dependencies. Combining --verbatim with any embed/fill flag is contradictory and rejected before reading the template.
Source
Thrown at cmd/limactl/template.go:131
if err != nil {
return err
}
fill, err := cmd.Flags().GetBool("fill")
if err != nil {
return err
}
verbatim, err := cmd.Flags().GetBool("verbatim")
if err != nil {
return err
}
if fill {
embedAll = true
}
if embedAll {
embed = true
}
if embed && verbatim {
return errors.New("--verbatim cannot be used with any of --embed, --embed-all, or --fill")
}
tmpl, err := limatmpl.Read(ctx, "", source)
if err != nil {
return err
}
if len(tmpl.Bytes) == 0 {
return fmt.Errorf("don't know how to interpret %#q as a template locator", source)
}
if !verbatim {
if embed {
// Embed default base.yaml only when fill is true.
if err := tmpl.Embed(ctx, embedAll, fill); err != nil {
return err
}
} else {
if err := tmpl.UseAbsLocators(ctx); err != nil {
return err
}View on GitHub (pinned to dd909d0973)
Solutions
- Remove --verbatim if you want dependency resolution (keep --embed/--embed-all/--fill)
- Remove the --embed/--embed-all/--fill flags if you want the exact original bytes
- In scripts, make the mode flags mutually exclusive (e.g. case/flag groups)
Example fix
// before limactl copy --verbatim --embed template://default my.yaml // after limactl copy --embed template://default my.yaml # or truly verbatim: limactl copy --verbatim template://default my.yaml
Defensive patterns
Strategy: validation
Validate before calling
# reject conflicting modes before invoking
[[ ( $verbatim && ( $embed || $embed_all || $fill ) ) ]] && { echo 'conflicting copy modes'; exit 2; } Try / catch
if ! limactl copy "$@"; then echo 'check flag combination: --verbatim excludes embed/fill'; fi
Prevention
- Pick one copy mode per invocation
- In scripts, build flag arrays exclusively (either verbatim or embed/fill)
- Run `limactl copy --help` to confirm current flag semantics
When it happens
Trigger: `limactl copy --verbatim --embed ... source dest` or `--verbatim --fill ...` etc.
Common situations: Scripted flag accumulation where defaults set embed=true; users wanting verbatim output plus filled defaults without realizing they conflict; copy-pasting flag sets from different examples.
Related errors
- invalid parameter %#q, expected NAME=VALUE
- template does not define param %#q
- network mode %#q does not support specifying interface
- the file argument can be specified only for --check mode
- unexpected arguments %v
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/a03742f97399ab58.
Report an issue: GitHub.