From 90c997a4a1d3e9aed45f036d7f6f9f3230d5e71d Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Mon, 6 Sep 2021 17:37:13 -0700 Subject: [PATCH] Cleaned up arguments for chmod --- internal/app/wwctl/overlay/chmod/main.go | 4 ++-- internal/app/wwctl/overlay/chmod/root.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/app/wwctl/overlay/chmod/main.go b/internal/app/wwctl/overlay/chmod/main.go index 33cddb9b..a6eedb45 100644 --- a/internal/app/wwctl/overlay/chmod/main.go +++ b/internal/app/wwctl/overlay/chmod/main.go @@ -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) diff --git a/internal/app/wwctl/overlay/chmod/root.go b/internal/app/wwctl/overlay/chmod/root.go index baf03081..44173ecb 100644 --- a/internal/app/wwctl/overlay/chmod/root.go +++ b/internal/app/wwctl/overlay/chmod/root.go @@ -4,7 +4,7 @@ import "github.com/spf13/cobra" var ( baseCmd = &cobra.Command{ - Use: "chmod [flags] ", + Use: "chmod [flags] ", Short: "Change file permissions within an overlay", Long: "This command will allow you to change the permissions of a file within an\n" + "overlay.",