File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -120,28 +120,20 @@ func (a AgentAuthCmd) Invoke(ctx context.Context, in InvokeInput) error {
120120 pterm .Println (fmt .Sprintf (" Expires: %s" , invocation .ExpiresAt .Format (time .RFC3339 )))
121121 pterm .Println ()
122122
123- // Get the live view URL from the first poll
124- state , err := a .invocations .Get (ctx , invocation .InvocationID )
125- if err != nil {
126- return util.CleanedUpSdkError {Err : err }
127- }
128-
129- if state .LiveViewURL != "" {
130- pterm .Info .Println ("Open this URL in your browser to log in:" )
131- pterm .Println ()
132- pterm .Println (fmt .Sprintf (" %s" , state .LiveViewURL ))
133- pterm .Println ()
123+ pterm .Info .Println ("Open this URL in your browser to log in:" )
124+ pterm .Println ()
125+ pterm .Println (fmt .Sprintf (" %s" , invocation .HostedURL ))
126+ pterm .Println ()
134127
135- if ! in .NoBrowser {
136- if err := browser .OpenURL (state .LiveViewURL ); err != nil {
137- pterm .Warning .Printf ("Could not open browser automatically: %v\n " , err )
138- } else {
139- pterm .Info .Println ("(Opened in browser)" )
140- }
128+ if ! in .NoBrowser {
129+ if err := browser .OpenURL (invocation .HostedURL ); err != nil {
130+ pterm .Warning .Printf ("Could not open browser automatically: %v\n " , err )
131+ } else {
132+ pterm .Info .Println ("(Opened in browser)" )
141133 }
142- pterm .Println ()
143134 }
144135
136+ pterm .Println ()
145137 pterm .Info .Println ("Polling for completion..." )
146138
147139 startTime := time .Now ()
You can’t perform that action at this time.
0 commit comments