GoogleContainerTools/skaffold · error
`jobManifestPaths modify` requires exactly one manifest file
Error message
`jobManifestPaths modify` requires exactly one manifest file path argument
What it means
`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.
Source
Thrown at cmd/skaffold/app/cmd/inspect_job_manifest_paths.go:60
WithDescription("Print the list of jobManifestPaths that would be run for a given configuration (default skaffold configuration, specific module, specific profile, etc).").
WithFlagAdder(cmdJobManifestPathsListFlags).
NoArgs(listJobManifestPaths)
}
func cmdJobManifestPathsModify() *cobra.Command {
return NewCmd("modify").
WithExample("Modify the skaffold verify jobManifestPaths", "inspect jobManifestPaths list --format json").
WithExample("Modify the jobManifestPaths targeting a specific configuration", "inspect jobManifestPaths modify --profile local --format json").
WithDescription("Print the list of jobManifestPaths that would be run for a given configuration (default skaffold configuration, specific module, specific profile, etc).").
WithCommonFlags().
WithFlags([]*Flag{
// TODO(aaron-prindle) vvv 2 commands use this, should add to common flags w/ those 2 commands added
{Value: &outputFile, Name: "output", DefValue: "", Usage: "File to write `inspect jobManifestPath modify` result"},
}).
WithArgs(func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
olog.Entry(context.TODO()).Errorf("`jobManifestPaths modify` requires exactly one manifest file path argument")
return errors.New("`jobManifestPaths modify` requires exactly one manifest file path argument")
}
return nil
}, modifyJobManifestPaths)
}
func listJobManifestPaths(ctx context.Context, out io.Writer) error {
return jobManifestPaths.PrintJobManifestPathsList(ctx, out, inspect.Options{
Filename: inspectFlags.filename,
RemoteCacheDir: inspectFlags.remoteCacheDir,
OutFormat: inspectFlags.outFormat,
Modules: inspectFlags.modules,
Profiles: inspectFlags.profiles,
PropagateProfiles: inspectFlags.propagateProfiles,
})
}
func cmdJobManifestPathsListFlags(f *pflag.FlagSet) {
f.StringSliceVarP(&inspectFlags.profiles, "profile", "p", nil, `Profile names to activate`)View on GitHub (pinned to a1189de023)
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
Example fix
// before skaffold inspect jobManifestPaths modify a.yaml b.yaml // after skaffold inspect jobManifestPaths modify a.yaml --output result.yaml
Defensive patterns
Strategy: validation
Validate before calling
[ $# -eq 1 ] || { echo "usage: skaffold inspect jobManifestPaths modify <manifest>"; exit 1; } Prevention
- Use --output for the result file instead of a second positional
- Avoid passing unquoted globs that expand to multiple files
When it happens
Trigger: 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.
Common situations: Confusing the --output flag with the input file positional; passing glob patterns that expand to multiple files.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- `apply` requires at least one manifest argument
- `exec` requires exactly one action to execute
- `config-dependencies add` requires exactly one file path arg
- `inspect namespaces list` requires exactly one manifest file
- running diagnostic on artifacts: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/03d80c2819b45796.
Report an issue: GitHub.