{"record":{"id":"4415d14db635bd9e","repo":"GoogleContainerTools/skaffold","slug":"unsupported-template-s","errorCode":null,"errorMessage":"unsupported template: %s","messagePattern":"unsupported template: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/find_configs.go","lineNumber":79,"sourceCode":"\tcase \"json\":\n\t\tencoder := json.NewEncoder(out)\n\t\tencoder.SetIndent(\"\", \"\\t\")\n\t\treturn encoder.Encode(pathToVersion)\n\n\tcase \"table\":\n\t\tpathOutLen, versionOutLen := 70, 30\n\t\tfor p, v := range pathToVersion {\n\t\t\tc := output.Default\n\t\t\tif v != latest.Version {\n\t\t\t\tc = output.Green\n\t\t\t}\n\t\t\tc.Fprintf(out, fmt.Sprintf(\"%%-%ds\\t%%-%ds\\n\", pathOutLen, versionOutLen), p, v)\n\t\t}\n\n\t\treturn nil\n\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported template: %s\", format)\n\t}\n}\n\nfunc findConfigs(ctx context.Context, directory string) (map[string]string, error) {\n\tpathToVersion := make(map[string]string)\n\n\t// Find files ending in \".yaml\" and parseable to skaffold config in the specified root directory recursively.\n\tisYaml := func(path string, info walk.Dirent) (bool, error) {\n\t\treturn !info.IsDir() && (strings.HasSuffix(path, \".yaml\") || strings.HasSuffix(path, \".yml\")), nil\n\t}\n\n\terr := walk.From(directory).When(isYaml).Do(func(path string, _ walk.Dirent) error {\n\t\tif ctx.Err() != nil {\n\t\t\treturn ctx.Err()\n\t\t}\n\t\tcfgs, err := schema.ParseConfig(path)\n\t\tswitch {\n\t\tcase err != nil:","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/find_configs.go#L61-L97","documentation":"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.","triggerScenarios":"`skaffold find-configs --format <value>` where value is not one of the handled template cases, hitting the `default:` branch at find_configs.go:79.","commonSituations":"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.","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"],"exampleFix":"// before\nskaffold find-configs --format jsonn\n// error: unsupported template: jsonn\n// after\nskaffold find-configs --format json","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"\": true, \"json\": true /* see skaffold find-configs --help */}\nif !allowed[format] {\n    return fmt.Errorf(\"unsupported template: %s\", format)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["cli","flag-validation","template"],"backgroundTag":"invalid-flag-value","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}