Mark two upgrade arguments as required

Based on TSC feedback.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-11-06 15:42:46 -07:00
parent e80c639b11
commit ab6c6d2a05

View File

@@ -32,6 +32,12 @@ func init() {
Command.Flags().BoolVar(&replaceOverlays, "replace-overlays", false, "Replace 'wwinit' and 'generic' overlays with their split replacements")
Command.Flags().StringVarP(&inputPath, "input-path", "i", node.ConfigFile, "Path to a legacy nodes.conf")
Command.Flags().StringVarP(&outputPath, "output-path", "o", node.ConfigFile, "Path to write the upgraded nodes.conf to")
if err := Command.MarkFlagRequired("add-defaults"); err != nil {
panic(err)
}
if err := Command.MarkFlagRequired("replace-overlays"); err != nil {
panic(err)
}
}
func UpgradeNodesConf(cmd *cobra.Command, args []string) error {