Skip to content

Commit 36a54ad

Browse files
authored
Merge pull request kubernetes-sigs#10200 from chrischdi/pr-fix-debug-clusterctl-cmd-tests
🐛 clusterctl: move handlePlugins function call out of init to allow debugging tests
2 parents 91ad0fd + 448619b commit 36a54ad

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)