File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import (
2626 "github.com/fatih/color"
2727 "github.com/gobuffalo/flect"
2828 "github.com/olekukonko/tablewriter"
29+ "github.com/pkg/errors"
2930 "github.com/spf13/cobra"
3031 corev1 "k8s.io/api/core/v1"
3132 "k8s.io/apimachinery/pkg/util/duration"
@@ -94,7 +95,12 @@ var describeClusterClusterCmd = &cobra.Command{
9495 # e.g. show the infrastructure machine objects, no matter if the current state is already reported by the machine's Ready condition.
9596 clusterctl describe cluster test-1 --disable-no-echo` ),
9697
97- Args : cobra .ExactArgs (1 ),
98+ Args : func (cmd * cobra.Command , args []string ) error {
99+ if len (args ) != 1 {
100+ return errors .New ("please specify a cluster name" )
101+ }
102+ return nil
103+ },
98104 RunE : func (cmd * cobra.Command , args []string ) error {
99105 return runDescribeCluster (args [0 ])
100106 },
You can’t perform that action at this time.
0 commit comments