Skip to content

Commit 97a8e6d

Browse files
Fix spinner not stopping before success message
- Add s.Stop() call at end of pollUntil function - Add s.Stop() call in error path to ensure spinner is always stopped - Ensures success message appears on new line instead of same line as spinner - Addresses GitHub comment feedback about message formatting Co-Authored-By: Alec Fong <alecsanf@usc.edu>
1 parent 2159fea commit 97a8e6d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/cmd/copy/copy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,14 @@ func pollUntil(s *spinner.Spinner, wsid string, state string, copyStore CopyStor
278278
time.Sleep(5 * time.Second)
279279
ws, err := copyStore.GetWorkspace(wsid)
280280
if err != nil {
281+
s.Stop()
281282
return breverrors.WrapAndTrace(err)
282283
}
283284
s.Suffix = waitMsg
284285
if ws.Status == state {
285286
isReady = true
286287
}
287288
}
289+
s.Stop()
288290
return nil
289291
}

0 commit comments

Comments
 (0)