{"record":{"id":"03d80c2819b45796","repo":"GoogleContainerTools/skaffold","slug":"jobmanifestpaths-modify-requires-exactly-one-man","errorCode":null,"errorMessage":"`jobManifestPaths modify` requires exactly one manifest file path argument","messagePattern":"`jobManifestPaths modify` requires exactly one manifest file path argument","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/inspect_job_manifest_paths.go","lineNumber":60,"sourceCode":"\t\tWithDescription(\"Print the list of jobManifestPaths that would be run for a given configuration (default skaffold configuration, specific module, specific profile, etc).\").\n\t\tWithFlagAdder(cmdJobManifestPathsListFlags).\n\t\tNoArgs(listJobManifestPaths)\n}\n\nfunc cmdJobManifestPathsModify() *cobra.Command {\n\treturn NewCmd(\"modify\").\n\t\tWithExample(\"Modify the skaffold verify jobManifestPaths\", \"inspect jobManifestPaths list --format json\").\n\t\tWithExample(\"Modify the jobManifestPaths targeting a specific configuration\", \"inspect jobManifestPaths modify --profile local --format json\").\n\t\tWithDescription(\"Print the list of jobManifestPaths that would be run for a given configuration (default skaffold configuration, specific module, specific profile, etc).\").\n\t\tWithCommonFlags().\n\t\tWithFlags([]*Flag{\n\t\t\t// TODO(aaron-prindle) vvv 2 commands use this, should add to common flags w/ those 2 commands added\n\t\t\t{Value: &outputFile, Name: \"output\", DefValue: \"\", Usage: \"File to write `inspect jobManifestPath modify` result\"},\n\t\t}).\n\t\tWithArgs(func(cmd *cobra.Command, args []string) error {\n\t\t\tif len(args) != 1 {\n\t\t\t\tolog.Entry(context.TODO()).Errorf(\"`jobManifestPaths modify` requires exactly one manifest file path argument\")\n\t\t\t\treturn errors.New(\"`jobManifestPaths modify` requires exactly one manifest file path argument\")\n\t\t\t}\n\t\t\treturn nil\n\t\t}, modifyJobManifestPaths)\n}\n\nfunc listJobManifestPaths(ctx context.Context, out io.Writer) error {\n\treturn jobManifestPaths.PrintJobManifestPathsList(ctx, out, inspect.Options{\n\t\tFilename:          inspectFlags.filename,\n\t\tRemoteCacheDir:    inspectFlags.remoteCacheDir,\n\t\tOutFormat:         inspectFlags.outFormat,\n\t\tModules:           inspectFlags.modules,\n\t\tProfiles:          inspectFlags.profiles,\n\t\tPropagateProfiles: inspectFlags.propagateProfiles,\n\t})\n}\n\nfunc cmdJobManifestPathsListFlags(f *pflag.FlagSet) {\n\tf.StringSliceVarP(&inspectFlags.profiles, \"profile\", \"p\", nil, `Profile names to activate`)","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/inspect_job_manifest_paths.go#L42-L78","documentation":"`skaffold inspect jobManifestPaths modify` expects exactly one positional argument: the path to a manifest file whose jobManifestPaths will be modified. The Args validator returns this error for any other argument count.","triggerScenarios":"Running `skaffold inspect jobManifestPaths modify` with no argument, or with more than one path. Result output is written via the --output flag, which is not a positional argument.","commonSituations":"Confusing the --output flag with the input file positional; passing glob patterns that expand to multiple files.","solutions":["Pass exactly one manifest file path: `skaffold inspect jobManifestPaths modify path/to/skaffold.yaml`","Quote globs or ensure they expand to a single file","Use --output to direct the result to a file instead of adding a second positional"],"exampleFix":"// before\nskaffold inspect jobManifestPaths modify a.yaml b.yaml\n// after\nskaffold inspect jobManifestPaths modify a.yaml --output result.yaml","handlingStrategy":"validation","validationCode":"[ $# -eq 1 ] || { echo \"usage: skaffold inspect jobManifestPaths modify <manifest>\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --output for the result file instead of a second positional","Avoid passing unquoted globs that expand to multiple files"],"tags":["cli","argument-validation","skaffold"],"backgroundTag":"missing-required-argument","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"}