From 318bf526c6beecdbf170ba9a6429adb2bc2dab57 Mon Sep 17 00:00:00 2001 From: Tomas <40318863+tomasmik@users.noreply.github.com> Date: Mon, 29 May 2023 11:27:11 +0300 Subject: [PATCH] Link to the run at the bottom of local preview output (#147) --- internal/cmd/stack/local_preview.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/cmd/stack/local_preview.go b/internal/cmd/stack/local_preview.go index 4caace4..a72c97b 100644 --- a/internal/cmd/stack/local_preview.go +++ b/internal/cmd/stack/local_preview.go @@ -115,11 +115,12 @@ func localPreview() cli.ActionFunc { fmt.Println("You have successfully created a local preview run!") - fmt.Println("The live run can be visited at", authenticated.Client.URL( + linkToRun := authenticated.Client.URL( "/stack/%s/run/%s", stackID, triggerMutation.RunProposeLocalWorkspace.ID, - )) + ) + fmt.Println("The live run can be visited at", linkToRun) if cliCtx.Bool(flagNoTail.Name) { return nil @@ -130,6 +131,8 @@ func localPreview() cli.ActionFunc { return err } + fmt.Println("View full logs at", linkToRun) + return terminal.Error() } }