From 88f490bcd90a46a84b607d5680f8e6b0bb5dffe2 Mon Sep 17 00:00:00 2001 From: nasa Date: Tue, 17 May 2022 22:05:56 +0900 Subject: [PATCH] issue view: ensure loading indicator is stopped when a prompt is shown (#5641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mislav Marohnić --- context/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/context/context.go b/context/context.go index d549dc04c..40a9383a3 100644 --- a/context/context.go +++ b/context/context.go @@ -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,