main: rename basedir -> base-dir

Rename the `basedir` argument to be consistent with `output-dir`
by hyphenation.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-02-26 20:12:07 +01:00 committed by Michael Vogt
parent 2e741a70ad
commit 58aa0cf87b
3 changed files with 10 additions and 10 deletions

View file

@ -41,7 +41,7 @@ func cmdListImages(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
dataDir, err := cmd.Flags().GetString("datadir")
dataDir, err := cmd.Flags().GetString("data-dir")
if err != nil {
return err
}
@ -79,7 +79,7 @@ func ostreeImageOptions(cmd *cobra.Command) (*ostree.ImageOptions, error) {
}
func cmdManifestWrapper(pbar progress.ProgressBar, cmd *cobra.Command, args []string, w io.Writer, archChecker func(string) error) (*imagefilter.Result, error) {
dataDir, err := cmd.Flags().GetString("datadir")
dataDir, err := cmd.Flags().GetString("data-dir")
if err != nil {
return nil, err
}
@ -284,7 +284,7 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
func cmdDescribeImg(cmd *cobra.Command, args []string) error {
// XXX: boilderplate identical to cmdManifest() above
dataDir, err := cmd.Flags().GetString("datadir")
dataDir, err := cmd.Flags().GetString("data-dir")
if err != nil {
return err
}
@ -327,7 +327,7 @@ Image-builder builds operating system images for a range of predefined
operating systems like Fedora, CentOS and RHEL with easy customizations support.`,
SilenceErrors: true,
}
rootCmd.PersistentFlags().String("datadir", "", `Override the default data directory for e.g. custom repositories/*.json data`)
rootCmd.PersistentFlags().String("data-dir", "", `Override the default data directory for e.g. custom repositories/*.json data`)
rootCmd.PersistentFlags().StringArray("extra-repo", nil, `Add an extra repository during build (will *not* be gpg checked and not be part of the final image)`)
rootCmd.PersistentFlags().StringArray("force-repo", nil, `Override the base repositories during build (these will not be part of the final image)`)
rootCmd.PersistentFlags().String("output-dir", "", `Put output into the specified directory`)