Skip to content

Commit

Permalink
Apply @makkes suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Vinícius Garcia <vingarcia00@gmail.com>
  • Loading branch information
VinGarcia committed Nov 16, 2023
1 parent 025a4ed commit 20137fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions cmd/flux/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"time"

"github.com/manifoldco/promptui"
Expand All @@ -37,6 +36,7 @@ import (

var installCmd = &cobra.Command{
Use: "install",
Args: cobra.NoArgs,
Short: "Install or upgrade Flux",
Long: `The install command deploys Flux in the specified namespace.
If a previous version is installed, then an in-place upgrade will be performed.`,
Expand Down Expand Up @@ -115,10 +115,6 @@ func NewInstallFlags() installFlags {
}

func installCmdRun(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
return fmt.Errorf(`flux install received unexpected positional arguments: "%s"`, strings.Join(args, `", "`))
}

ctx, cancel := context.WithTimeout(context.Background(), rootArgs.timeout)
defer cancel()

Expand Down
4 changes: 2 additions & 2 deletions cmd/flux/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func TestInstall(t *testing.T) {
},
{
name: "invalid namespace",
args: "install unexpected pos arg --namespace=example",
assert: assertError("flux install received unexpected positional arguments: \"unexpected\", \"pos\", \"arg\""),
args: "install unexpectedPosArg --namespace=example",
assert: assertError(`unknown command "unexpectedPosArg" for "flux install"`),
},
}

Expand Down

0 comments on commit 20137fe

Please sign in to comment.