From e469f1d84992bd89ec7e82c3ff2ba778bcf78f36 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 20 Sep 2024 11:12:38 +0200 Subject: [PATCH] Link to the appropriate explore page when starting `explore` --- cmd/explore.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/explore.go b/cmd/explore.go index baa10a7c..b441fcd9 100644 --- a/cmd/explore.go +++ b/cmd/explore.go @@ -130,9 +130,6 @@ func Explore(cmd *cobra.Command, args []string) error { multi := pterm.DefaultMultiPrinter _, _ = multi.Start() - defer func() { - _, _ = multi.Stop() - }() ctx, oi, token, err := login(ctx, cmd, []string{"request:receive"}, multi.NewWriter()) if err != nil { @@ -145,7 +142,12 @@ func Explore(cmd *cobra.Command, args []string) error { } defer cleanup() - pterm.Fprinto(multi.NewWriter(), pterm.Success.Sprint("Press any key to stop the sources")) + _, _ = multi.Stop() + + pterm.Println() + pterm.Println(fmt.Sprintf("Explore your infrastructure graph at %v/explore", oi.FrontendUrl)) + pterm.Println() + pterm.Success.Println("Press any key to stop the sources") err = keyboard.Listen(func(keyInfo keys.Key) (stop bool, err error) { return true, nil })