Cleaned up arguments for chmod
This commit is contained in:
@@ -16,9 +16,9 @@ import (
|
||||
func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
var overlaySourceDir string
|
||||
overlayName := args[0]
|
||||
fileName := args[2]
|
||||
fileName := args[1]
|
||||
|
||||
permissionMode, err := strconv.ParseInt(args[1], 8, 32)
|
||||
permissionMode, err := strconv.ParseInt(args[2], 8, 32)
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "Could not convert requested mode: %s\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -4,7 +4,7 @@ import "github.com/spf13/cobra"
|
||||
|
||||
var (
|
||||
baseCmd = &cobra.Command{
|
||||
Use: "chmod [flags] <overlay> <mode> <path>",
|
||||
Use: "chmod [flags] <overlay> <path> <mode>",
|
||||
Short: "Change file permissions within an overlay",
|
||||
Long: "This command will allow you to change the permissions of a file within an\n" +
|
||||
"overlay.",
|
||||
|
||||
Reference in New Issue
Block a user