GoogleContainerTools/skaffold · error
strings.Join(messages, " | ")
Error message
strings.Join(messages, " | ")
What it means
MakeFilePathsAbsolute walks a skaffold config and rewrites relative file paths to be absolute against the config's base directory. When that per-field rewriting produces multiple errors, it does not return them individually; instead it aggregates all messages joined with " | " into a single error. This message is literally the joined list of underlying validation/rewrite failures.
Source
Thrown at pkg/skaffold/tags/paths.go:41
"path/filepath"
"reflect"
"slices"
"strings"
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/output/log"
)
// MakeFilePathsAbsolute recursively sets all fields marked with the tag `filepath` to absolute paths
func MakeFilePathsAbsolute(s interface{}, base string) error {
errs := makeFilePathsAbsolute(s, base)
if len(errs) == 0 {
return nil
}
var messages []string
for _, err := range errs {
messages = append(messages, err.Error())
}
return errors.New(strings.Join(messages, " | "))
}
func makeFilePathsAbsolute(config interface{}, base string) []error {
if config == nil {
return nil
}
parentStruct := reflect.Indirect(reflect.ValueOf(config))
switch parentStruct.Kind() {
case reflect.Struct:
t := parentStruct.Type()
var errs []error
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
v := parentStruct.Field(i)
if !v.CanInterface() {
return errs
}View on GitHub (pinned to a1189de023)
Solutions
- Parse the joined message: each " | "-separated segment is an individual error to fix.
- Fix each referenced path in skaffold.yaml (make sure files/dirs exist relative to the skaffold.yaml location).
- Run from the directory containing skaffold.yaml, or ensure base path resolution matches your working directory.
- Validate the config with `skaffold config` linting or `skaffold render` to surface remaining path issues one at a time.
Example fix
// before
return errors.New(strings.Join(messages, " | "))
// after (caller handling)
for _, part := range strings.Split(err.Error(), " | ") {
log.Printf("config path issue: %s", part)
} Defensive patterns
Strategy: try-catch
Validate before calling
const files = collectConfigPaths(cfg);
for (const f of files) {
if (f && !fs.existsSync(path.resolve(configDir, f))) console.warn('path missing:', f);
} Try / catch
try {
makeFilePathsAbsolute(cfg, baseDir);
} catch (e) {
const issues = e.message.split(' | ');
issues.forEach(msg => console.error('config path error:', msg));
} Prevention
- Resolve and lint all relative paths in skaffold.yaml before running
- Run skaffold from the config's directory or use absolute paths
- Split error messages on ' | ' to triage each underlying failure
When it happens
Trigger: A skaffold config contains multiple invalid path fields (e.g. two dockerfiles or manifests with nil/invalid contexts), so makeFilePathsAbsolute returns several errors which get joined; callers like processEachConfig surface them as one string.
Common situations: Configs with several artifacts each having path problems; empty config sections that yield nil errors elsewhere but path failures here; hand-edited skaffold.yaml with several wrong relative paths at once.
Related errors
- verify command expects non-zero number of test cases
- CONFIG_MISSING_MANIFEST_FILE_ERR
- INIT_CLOUD_RUN_LOCATION_ERROR
- missing apiVersion
- custom tag not provided
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/df16f9b361ad735e.
Report an issue: GitHub.