cmd: exactly 1 arg

Since we only accept one image type (for now) we only need to accept
exactly one argument.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-01-17 09:36:31 +01:00
parent 0c255f2bdb
commit ff62775628

View file

@ -176,7 +176,7 @@ operating sytsems like centos and RHEL with easy customizations support.`,
Short: "Build manifest for the given distro/image-type, e.g. centos-9 qcow2",
RunE: cmdManifest,
SilenceUsage: true,
Args: cobra.RangeArgs(1, 2),
Args: cobra.ExactArgs(1),
Hidden: true,
}
manifestCmd.Flags().String("blueprint", "", `blueprint to customize an image`)
@ -192,7 +192,7 @@ operating sytsems like centos and RHEL with easy customizations support.`,
Short: "Build the given distro/image-type, e.g. centos-9 qcow2",
RunE: cmdBuild,
SilenceUsage: true,
Args: cobra.RangeArgs(1, 2),
Args: cobra.ExactArgs(1),
}
buildCmd.Flags().AddFlagSet(manifestCmd.Flags())
// XXX: add --rpmmd cache too and put under /var/cache/image-builder/dnf