mirror of
https://github.com/clinicjs/node-clinic.git
synced 2026-01-18 16:22:03 +00:00
Fix infinite spinner on --collect-only (#101)
In --collect-only, the CLI wasn't stopping the spinner after it completed. The spinner uses `setInterval` so it would just keep going indefinitely, preventing the process from exiting. Now it's correctly stopped.
This commit is contained in:
parent
f4f983ec6a
commit
72472d0756
4
bin.js
4
bin.js
@ -355,6 +355,10 @@ function runTool (args, Tool, version, uiOptions) {
|
||||
process.once('SIGINT', onsigint)
|
||||
tool.collect(args['--'], function (err, filename) {
|
||||
if (err) throw err
|
||||
if (spinner.isEnabled) {
|
||||
spinner.stop()
|
||||
spinner.stream.write(`${spinner.text}\n`)
|
||||
}
|
||||
console.log(`Output file is ${filename}`)
|
||||
})
|
||||
} else if (args['visualize-only']) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user