issue view: ensure loading indicator is stopped when a prompt is shown (#5641)

Co-authored-by: Mislav Marohnić <mislav@github.com>
This commit is contained in:
nasa 2022-05-17 22:05:56 +09:00 committed by GitHub
parent 9454ad3769
commit 88f490bcd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,6 +116,9 @@ func (r *ResolvedRemotes) BaseRepo(io *iostreams.IOStreams) (ghrepo.Interface, e
baseName := repoNames[0]
if len(repoNames) > 1 {
// hide the spinner in case a command started the progress indicator before base repo was fully
// resolved, e.g. in `gh issue view`
io.StopProgressIndicator()
err := prompt.SurveyAskOne(&survey.Select{
Message: "Which should be the base repository (used for e.g. querying issues) for this directory?",
Options: repoNames,