{"record":{"id":"a03742f97399ab58","repo":"lima-vm/lima","slug":"verbatim-cannot-be-used-with-any-of-embed-e","errorCode":null,"errorMessage":"--verbatim cannot be used with any of --embed, --embed-all, or --fill","messagePattern":"--verbatim cannot be used with any of --embed, --embed-all, or --fill","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/limactl/template.go","lineNumber":131,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\tfill, err := cmd.Flags().GetBool(\"fill\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tverbatim, err := cmd.Flags().GetBool(\"verbatim\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tif fill {\n\t\tembedAll = true\n\t}\n\tif embedAll {\n\t\tembed = true\n\t}\n\tif embed && verbatim {\n\t\treturn errors.New(\"--verbatim cannot be used with any of --embed, --embed-all, or --fill\")\n\t}\n\ttmpl, err := limatmpl.Read(ctx, \"\", source)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(tmpl.Bytes) == 0 {\n\t\treturn fmt.Errorf(\"don't know how to interpret %#q as a template locator\", source)\n\t}\n\tif !verbatim {\n\t\tif embed {\n\t\t\t// Embed default base.yaml only when fill is true.\n\t\t\tif err := tmpl.Embed(ctx, embedAll, fill); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\tif err := tmpl.UseAbsLocators(ctx); err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/cmd/limactl/template.go#L113-L149","documentation":"`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.","triggerScenarios":"`limactl copy --verbatim --embed ... source dest` or `--verbatim --fill ...` etc.","commonSituations":"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.","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)"],"exampleFix":"// before\nlimactl copy --verbatim --embed template://default my.yaml\n// after\nlimactl copy --embed template://default my.yaml\n# or truly verbatim:\nlimactl copy --verbatim template://default my.yaml","handlingStrategy":"validation","validationCode":"# reject conflicting modes before invoking\n[[ ( $verbatim && ( $embed || $embed_all || $fill ) ) ]] && { echo 'conflicting copy modes'; exit 2; }","typeGuard":null,"tryCatchPattern":"if ! limactl copy \"$@\"; then echo 'check flag combination: --verbatim excludes embed/fill'; fi","preventionTips":["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"],"tags":["cli","template","flag-conflict","argument-validation"],"backgroundTag":"conflicting-cli-flags","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}