ascii-progress
ascii-progress copied to clipboard
Weird caracters show up before progress bar
trafficstars
- node v 6.3.0
- inside a fiber or not...
- when doing a console.log after progress ended
- have weird "[-1;1" showing up before the progress bar and messing up all the formating (line is wrapped)
Here is a sample code to reproduce it (using sync module for fiber). Actually it does the same to me even outside a fiber!
let Sync = require('sync');
let ProgressBar = require('ascii-progress');
Sync(function () {
let bar = new ProgressBar({
schema: ':bar',
total: 100
});
var iv = setInterval(function () {
bar.tick();
if (bar.completed) {
clearInterval(iv);
console.log('woops!');
}
}, 10);
});
End up in:
[-1;1H▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ woops!
And btw this node module has an issue with installation.
Error: Cannot find module './build/release/pos'
It happens on require because the Release folder initially begin with a capital, I suppose it works fine on windows systems!