Cleaned up arguments for chmod

This commit is contained in:
Gregory Kurtzer
2021-09-06 17:37:13 -07:00
parent d8ba3b26c2
commit 90c997a4a1
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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.",