Explicitly enforce the number or arguments accepted by some wwctl subcommands. #1717

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-03-24 21:06:07 -06:00
parent 2d46a8b375
commit 9a3e48fa37
21 changed files with 21 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ var (
Long: "This command builds overlays for given nodes.",
RunE: CobraRunE,
ValidArgsFunction: completions.Nodes,
Args: cobra.ArbitraryArgs,
}
OverlayNames []string
OverlayDir string

View File

@@ -14,6 +14,7 @@ var (
RunE: CobraRunE,
Aliases: []string{"ls"},
ValidArgsFunction: completions.Overlays,
Args: cobra.ArbitraryArgs,
}
ListContents bool
ListLong bool

View File

@@ -20,6 +20,7 @@ var (
Use: "overlay COMMAND [OPTIONS]",
Short: "Warewulf Overlay Management",
Long: "Management interface for Warewulf overlays",
Args: cobra.NoArgs,
}
)