Merge pull request #1431 from JasonYangShadow/issue/502
`wwctl node set` requires mandatory pattern input
This commit is contained in:
@@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Disable building containers by default when calling `wwctl container copy`. #1378
|
||||
- Split wwinit and generic overlays into discrete functionality. #987
|
||||
- Updated IgnitionJson to sort filesystems. #1433
|
||||
- `wwctl node set` requires mandatory pattern input. #502
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ func GetCommand() *cobra.Command {
|
||||
vars.nodeConf = node.NewConf()
|
||||
baseCmd := &cobra.Command{
|
||||
DisableFlagsInUseLine: true,
|
||||
Use: "set [OPTIONS] PATTERN [PATTERN ...]",
|
||||
Use: "set [OPTIONS] PATTERN",
|
||||
Short: "Configure node properties",
|
||||
Long: "This command sets configuration properties for nodes matching PATTERN.\n\nNote: use the string 'UNSET' to remove a configuration",
|
||||
Aliases: []string{"modify"},
|
||||
Args: cobra.MinimumNArgs(0),
|
||||
Args: cobra.MinimumNArgs(1), // require pattern as a mandatory arg
|
||||
RunE: CobraRunE(&vars),
|
||||
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
if len(args) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user