GoogleContainerTools/skaffold · error
unsupported template: %s
Error message
unsupported template: %s
What it means
Returned by doFindConfigs when the --format/-t flag value is not one of the supported template options in `skaffold find-configs`. The default branch of the format switch rejects any unrecognized value.
Source
Thrown at cmd/skaffold/app/cmd/find_configs.go:79
case "json":
encoder := json.NewEncoder(out)
encoder.SetIndent("", "\t")
return encoder.Encode(pathToVersion)
case "table":
pathOutLen, versionOutLen := 70, 30
for p, v := range pathToVersion {
c := output.Default
if v != latest.Version {
c = output.Green
}
c.Fprintf(out, fmt.Sprintf("%%-%ds\t%%-%ds\n", pathOutLen, versionOutLen), p, v)
}
return nil
default:
return fmt.Errorf("unsupported template: %s", format)
}
}
func findConfigs(ctx context.Context, directory string) (map[string]string, error) {
pathToVersion := make(map[string]string)
// Find files ending in ".yaml" and parseable to skaffold config in the specified root directory recursively.
isYaml := func(path string, info walk.Dirent) (bool, error) {
return !info.IsDir() && (strings.HasSuffix(path, ".yaml") || strings.HasSuffix(path, ".yml")), nil
}
err := walk.From(directory).When(isYaml).Do(func(path string, _ walk.Dirent) error {
if ctx.Err() != nil {
return ctx.Err()
}
cfgs, err := schema.ParseConfig(path)
switch {
case err != nil:View on GitHub (pinned to a1189de023)
Solutions
- Use one of the supported format values (check --help for find-configs)
- Correct the typo in the --format flag
- Drop the --format flag to use the default output
- Check the current skaffold version's docs, since formats can change between versions
Example fix
// before skaffold find-configs --format jsonn // error: unsupported template: jsonn // after skaffold find-configs --format json
Defensive patterns
Strategy: validation
Validate before calling
allowed := map[string]bool{"": true, "json": true /* see skaffold find-configs --help */}
if !allowed[format] {
return fmt.Errorf("unsupported template: %s", format)
} Prevention
- Check --help for the exact list of supported --format values
- Avoid copying --format values between different skaffold subcommands
- Pin scripts to a skaffold version and verify flags against it
When it happens
Trigger: `skaffold find-configs --format <value>` where value is not one of the handled template cases, hitting the `default:` branch at find_configs.go:79.
Common situations: Typo in the format name, copying a --format value from a different skaffold command, or scripting with an outdated format option after a version change.
Understand the failure class
Background: "unknown output mode", "invalid value for flag", "expects true/false": fixing invalid flag value errors in CLI tools — this error's family across 24 libraries.
Related errors
- executing template: %w
- invalid output type: %q. Must be "plain" or "json"
- setting template flag: %w
- `apply` requires at least one manifest argument
- `exec` requires exactly one action to execute
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/4415d14db635bd9e.
Report an issue: GitHub.