Add progress indicator when installing an extension (#8411)

This commit is contained in:
Zach Steindler 2023-12-04 14:52:11 -05:00 committed by GitHub
parent 08fb744229
commit 6eb650185b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,7 +347,11 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command {
return err
}
if err := m.Install(repo, pinFlag); err != nil {
io.StartProgressIndicator()
err = m.Install(repo, pinFlag)
io.StopProgressIndicator()
if err != nil {
if errors.Is(err, releaseNotFoundErr) {
return fmt.Errorf("%s Could not find a release of %s for %s",
cs.FailureIcon(), args[0], cs.Cyan(pinFlag))