diff --git a/pkg/pluginmanager/manager.go b/pkg/pluginmanager/manager.go index 4d136d714..f641fd249 100644 --- a/pkg/pluginmanager/manager.go +++ b/pkg/pluginmanager/manager.go @@ -11,6 +11,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "strings" "github.com/Masterminds/semver" @@ -64,6 +65,11 @@ var spinner component.OutputWriterSpinner func init() { // Initialize global spinner spinner = component.NewOutputWriterSpinner(component.WithOutputStream(os.Stderr)) + runtime.SetFinalizer(spinner, func(s component.OutputWriterSpinner) { + if s != nil { + s.StopSpinner() + } + }) } func StopSpinner() {