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

Show progress when installing #43

Open
danielcompton opened this issue Dec 10, 2015 · 2 comments
Open

Show progress when installing #43

danielcompton opened this issue Dec 10, 2015 · 2 comments

Comments

@danielcompton
Copy link
Contributor

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.

@RyanMcG
Copy link
Owner

RyanMcG commented Dec 17, 2015

That's a great idea. I'll look into this.

@RyanMcG
Copy link
Owner

RyanMcG commented Dec 17, 2015

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.

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