Skip to content
New issue

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

Callback functions not being called on process signals #30

Open
lansinq opened this issue Mar 3, 2021 · 1 comment
Open

Callback functions not being called on process signals #30

lansinq opened this issue Mar 3, 2021 · 1 comment

Comments

@lansinq
Copy link

lansinq commented Mar 3, 2021

const Spinnies = require('spinnies');
const spinnies = new Spinnies();

spinnies.add('foo');
setTimeout(() => spinnies.succeed('foo'), 5000);

process.on('SIGINT', () => {
  process.stdout.write('^C received\n');
  process.exit(0);
});

The custom callback function is never launched.

@lansinq lansinq changed the title Process signals not working Callback functions not being called on process signals Mar 3, 2021
@rafipiccolo
Copy link

this is not related to this lib.

if you replace

process.stdout.write('^C received\n');

with

console.log('^C received\n');

the message appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants