Skip to content

Commit 448619b

Browse files
committed
clusterctl: move handlePlugins function call out of init to allow debugging tests
1 parent 02b8789 commit 448619b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/clusterctl/cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ var RootCmd = &cobra.Command{
106106

107107
// Execute executes the root command.
108108
func Execute() {
109+
handlePlugins()
110+
109111
if err := RootCmd.Execute(); err != nil {
110112
if verbosity != nil && *verbosity >= 5 {
111113
if err, ok := err.(stackTracer); ok {
@@ -146,8 +148,6 @@ func init() {
146148
RootCmd.SetCompletionCommandGroupID(groupOther)
147149

148150
cobra.OnInitialize(initConfig, registerCompletionFuncForCommonFlags)
149-
150-
handlePlugins()
151151
}
152152

153153
func initConfig() {

0 commit comments

Comments
 (0)