{"record":{"id":"1d23d00ccb1e0464","repo":"GoogleContainerTools/skaffold","slug":"processing-word-w","errorCode":null,"errorMessage":"processing word: %w","messagePattern":"processing word: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/docker/parse.go","lineNumber":295,"sourceCode":"\t\t\t// was already changed.\n\t\t\tif !stages[strings.ToLower(from.image)] {\n\t\t\t\timg, err := RetrieveImage(ctx, from.image, cfg)\n\t\t\t\tif err == nil {\n\t\t\t\t\tworkdir = img.Config.WorkingDir\n\t\t\t\t} else if _, ok, err := isOldImageManifestProblem(cfg, err); !ok {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif workdir == \"\" {\n\t\t\t\t\tworkdir = \"/\"\n\t\t\t\t}\n\t\t\t}\n\t\t\tif onlyLastImage {\n\t\t\t\tcopied = nil\n\t\t\t}\n\t\tcase command.Workdir:\n\t\t\tvalue, _, err := slex.ProcessWord(node.Next.Value, shell.EnvsFromSlice(envs))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"processing word: %w\", err)\n\t\t\t}\n\t\t\tworkdir = resolveDir(workdir, value)\n\t\tcase command.Add, command.Copy:\n\t\t\tcpCmd, err := readCopyCommand(node, envs, workdir)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tif cpCmd != nil && len(cpCmd.srcs) > 0 {\n\t\t\t\tcopied = append(copied, cpCmd)\n\t\t\t}\n\t\tcase command.Env:\n\t\t\t// one env command may define multiple variables\n\t\t\tfor node := node.Next; node != nil && node.Next != nil && node.Next.Next != nil; node = node.Next.Next.Next {\n\t\t\t\tenvs = append(envs, fmt.Sprintf(\"%s=%s\", node.Value, unquote(node.Next.Value)))\n\t\t\t}\n\t\t}\n\t}","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/docker/parse.go#L277-L313","documentation":"Fires in extractCopyCommands when shell-like word expansion of a WORKDIR instruction's value fails (slex.ProcessWord), e.g. malformed variable references or unmatched quotes/escapes in the WORKDIR argument given the parsed env set. Dockerfile parsing itself succeeded; only the word expansion failed.","triggerScenarios":"Thrown at pkg/skaffold/docker/parse.go:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Simplify the WORKDIR value (avoid complex nested variable expansions)","Define required ARG/ENV variables earlier so expansion resolves","Fix unbalanced quotes or escape characters in the WORKDIR instruction"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}