Show progress when installing
danielcompton opened this issue · 2 comments
When you're installing a large package like Karma, it can take a while for it to install. lein-npm currently just sits there and it's not obvious what's happening. It could be good to show some output here, though I'm not sure whether you could show the npm output or something else.
That's a great idea. I'll look into this.
So, after doing a bit of research this might be a bit more difficult than anticipated. This is primarily because npm directly manipulates the TTY to generate its progress bar, or at the very least, if npm is not running in a TTY it does not try to output a progress bar. Since leiningen is the running process, it would have to create a pty to "trick" npm into outputting the progress bar. This is difficult to do from Java because there is not builtin support for pty, we'd have to use a library.
Using unbuffer
is an option though, so maybe opting in to it if its is in the user's PATH
when the lein npm
process is running in a TTY would be acceptable.