Skip to content

Commit efc05de

Browse files
committed
Use spinner helper
1 parent b2edf78 commit efc05de

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

pkg/cmd/issue/view/view.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"time"
99

1010
"github.com/MakeNowJust/heredoc"
11-
"github.com/briandowns/spinner"
1211
"github.com/cli/cli/api"
1312
"github.com/cli/cli/internal/config"
1413
"github.com/cli/cli/internal/ghrepo"
@@ -93,21 +92,13 @@ func viewRun(opts *ViewOptions) error {
9392
}
9493

9594
if opts.Comments {
96-
var s *spinner.Spinner
97-
if opts.IO.IsStdoutTTY() {
98-
s = utils.Spinner(opts.IO.ErrOut)
99-
utils.StartSpinner(s)
100-
}
101-
95+
opts.IO.StartProgressIndicator()
10296
comments, err := api.CommentsForIssue(apiClient, repo, issue)
97+
opts.IO.StopProgressIndicator()
10398
if err != nil {
10499
return err
105100
}
106101
issue.Comments = *comments
107-
108-
if opts.IO.IsStdoutTTY() {
109-
utils.StopSpinner(s)
110-
}
111102
}
112103

113104
opts.IO.DetectTerminalTheme()

0 commit comments

Comments
 (0)