diff --git a/cmd/connect.go b/cmd/connect.go index 8c7c025..3cbb2d9 100644 --- a/cmd/connect.go +++ b/cmd/connect.go @@ -55,6 +55,10 @@ Then paste the token`, Run: func(cmd *cobra.Command, args []string) { flag.Parse() + if host == "" { + host = handler.FuzzEndpoints(iam) + } + if iam { myFigure := figure.NewFigure("DBC Connect IAM", "", true) myFigure.Print() @@ -67,10 +71,6 @@ Then paste the token`, myFigure.Print() fmt.Println("") } - - if host == "" { - host = handler.FuzzEndpoints(iam) - } // Start Port-Forwarding Session handler.Handler(region, host, port, localport) },