Files
warewulf/internal/app/wwctl/overlay/mkdir/root.go
MatthewHink 1e0e270812 Fix wwctl overlay mkdir #248.
Added argument testing around this.
2022-01-27 11:50:10 -05:00

27 lines
698 B
Go

package mkdir
import (
"github.com/spf13/cobra"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "mkdir [OPTIONS] OVERLAY_NAME DIRECTORY",
Short: "Create a new directory within an Overlay",
Long: "This command creates a new directory within the Warewulf OVERLAY_NAME.",
RunE: CobraRunE,
Args: cobra.MinimumNArgs(2),
}
PermMode int32
)
func init() {
baseCmd.PersistentFlags().Int32VarP(&PermMode, "mode", "m", 0755, "Permission mode for directory")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}