Skip to content

Commit

Permalink
Merge pull request #342 from pterm/341-putils-dont-stop-already-stopp…
Browse files Browse the repository at this point in the history
…ed-spinners
  • Loading branch information
MarvinJWendt committed Apr 12, 2022
2 parents 290790d + 250b38a commit a1abf16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion putils/run-with-spinner.go
Expand Up @@ -10,7 +10,10 @@ func RunWithSpinner(spinner *pterm.SpinnerPrinter, f func(spinner *pterm.Spinner
}

err = f(s)
s.Stop()

if s.IsActive {
s.Stop()
}

return err
}
Expand Down

0 comments on commit a1abf16

Please sign in to comment.