{"record":{"id":"cf00908f8ffc1db4","repo":"GoogleContainerTools/skaffold","slug":"expanding-kubectl-manifest-paths-w","errorCode":null,"errorMessage":"expanding kubectl manifest paths: %w","messagePattern":"expanding kubectl manifest paths: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/render/generate/generate.go","lineNumber":103,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tlocalPaths = append(localPaths, path)\n\t\t}\n\t}\n\tlist, err := util.ExpandPathsGlob(workdir, localPaths)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif len(gcsManifests) != 0 {\n\t\t// return tmp dir of the downloaded manifests\n\t\ttmpDir, err := manifest.DownloadFromGCS(gcsManifests)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"downloading from GCS: %w\", err)\n\t\t}\n\t\tl, err := util.ExpandPathsGlob(tmpDir, []string{\"*\"})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"expanding kubectl manifest paths: %w\", err)\n\t\t}\n\t\tlist = append(list, l...)\n\t}\n\tif len(urlManifests) != 0 {\n\t\tpaths, err := manifest.DownloadFromURL(urlManifests)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tlist = append(list, paths...)\n\t}\n\treturn list, nil\n}\n\n// Generate parses the config resources from the paths in .Generate.Manifests. This path can be the path to raw manifest,\n// kustomize manifests, helm charts or kpt function configs. All should be file-watched.\nfunc (g Generator) Generate(ctx context.Context, out io.Writer) (manifest.ManifestList, error) {\n\tvar manifests manifest.ManifestList\n","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/render/generate/generate.go#L85-L121","documentation":"After successfully downloading GCS manifests into a temp dir, resolveRemoteAndLocal calls util.ExpandPathsGlob(tmpDir, [\"*\"]) to enumerate the downloaded files. This error wraps any glob-expansion failure. It indicates the downloaded temp dir could not be read or the glob pattern matched nothing/errored.","triggerScenarios":"manifest.DownloadFromGCS succeeded but the returned tmpDir is unreadable/empty, so util.ExpandPathsGlob fails while expanding \"*\" in resolveRemoteAndLocal.","commonSituations":"Disk permission issues on the temp directory; filesystem cleanup raced the glob; an empty or malformed download produced an unusable tmpDir; OS temp dir mounted read-only.","solutions":["Check OS temp directory (TMPDIR) exists, is writable and has space","Re-run the command; a transient download/extract issue may have left an empty dir","Verify the downloaded GCS objects actually contain files with valid names","Update Skaffold — earlier versions had tmpdir handling bugs"],"exampleFix":"// before: relies on default TMPDIR that may be unwritable\n$ skaffold render\n// after: point TMPDIR at a writable location\n$ TMPDIR=/var/tmp skaffold render","handlingStrategy":"validation","validationCode":"if st, err := os.Stat(os.TempDir()); err != nil || !st.IsDir() { return fmt.Errorf(\"TMPDIR unusable\") }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"expanding kubectl manifest paths\") {\n    // inspect TMPDIR permissions/space and retry with TMPDIR set to a writable dir\n}","preventionTips":["Keep TMPDIR writable and with free space, especially in containers","Re-run on transient failures before deeper debugging","Keep Skaffold updated for tmpdir handling fixes"],"tags":["glob","filesystem","manifests","temp-dir"],"backgroundTag":"path-expansion-failed","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"}