We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove
The code below should exit cleanly after the timeout callback is fired.
const Spinnies = require("spinnies"); const spinners = new Spinnies(); spinners.add("spinner-1", { text: "some spinner" }); setTimeout(() => { spinners.remove("spinner-1"); console.log("I should exit now!"); },1000);
The spinner is removed as expected, but the node process hangs after printing the text I should exit now.
node
I should exit now
The following code exits as expected (note the addition of spinners.checkIfActiveSpinners() after the call to spinners.remove:
spinners.checkIfActiveSpinners()
spinners.remove
const Spinnies = require("spinnies"); const spinners = new Spinnies(); spinners.add("spinner-1", { text: "some spinner" }); setTimeout(() => { spinners.remove("spinner-1"); spinners.checkIfActiveSpinners(); console.log("I should exit now!"); },1000);
I think the fix proposed in SweetMNM#1 (a PR to a fork of this project) would also work here, though the patch itself likely wouldn't apply cleanly.
The text was updated successfully, but these errors were encountered:
Odd that merging my PR to my forked repo closed this ticket... ¯_(ツ)_/¯
Sorry, something went wrong.
note that if call spinners.succeed("spinner-1"); before or instead of remove it works.
Successfully merging a pull request may close this issue.
Expected Behavior
The code below should exit cleanly after the timeout callback is fired.
Actual Behavior
The spinner is removed as expected, but the
node
process hangs after printing the textI should exit now
.Workaround
The following code exits as expected (note the addition of
spinners.checkIfActiveSpinners()
after the call tospinners.remove
:Potential fix
I think the fix proposed in SweetMNM#1 (a PR to a fork of this project) would also work here, though the patch itself likely wouldn't apply cleanly.
The text was updated successfully, but these errors were encountered: