Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Preserving colorized output #7

Closed
danawoodman opened this issue Feb 2, 2015 · 8 comments
Closed

Preserving colorized output #7

danawoodman opened this issue Feb 2, 2015 · 8 comments

Comments

@danawoodman
Copy link

Very cool package. One thing I'd love to see is the preservation of colored terminal output. Right now the color is stripped out. Would this be something that is possible to add in?

@keithamus
Copy link
Collaborator

Thanks @danawoodman for the issue. Parallelshell should just pipe the output down without issue - so should support colour fine. What are you seeing, no colours or loads of gibberish? If no colours it could be some kind of colour detection from the program you're using - which we should be able to trick into showing colours. What program are you using that is not showing colours?

@danawoodman
Copy link
Author

Thanks for the quick reply!

I'm seeing the following when running parrallelshell 'mocha':

with parrallelshell

...where as if I run Mocha directly I get:

without parrallelshell

I'm using iTerm2 to display the output.

@keithamus
Copy link
Collaborator

Seems like mocha is checking tty.isatty(1) && tty.isatty(2) in the base reporter. I believe we'd just need to trick it into believing that parallelshell's stdin and out are ttys.

@danawoodman
Copy link
Author

@keithamus would using spawn work instead of exec?

@paulpflug paulpflug mentioned this issue Mar 2, 2015
keithamus added a commit that referenced this issue Mar 2, 2015
@keithamus
Copy link
Collaborator

Deployed as v1.1.0

@danawoodman
Copy link
Author

Yay! 👍

@danawoodman
Copy link
Author

I'm now getting the following exception locally:

$ ./node_modules/parallelshell/index.js
./node_modules/parallelshell/index.js: line 1: use strict: command not found
./node_modules/parallelshell/index.js: line 2: syntax error near unexpected token `('
./node_modules/parallelshell/index.js: line 2: `var spawn = require('child_process').spawn;'

Any thoughts?

@danawoodman
Copy link
Author

Nevermind, I was running it directly on the command line rather than running through Node

estk pushed a commit to estk/parallelshell that referenced this issue Sep 21, 2015
fix for darkguy2008#7
largely copied from nodemon
estk pushed a commit to estk/parallelshell that referenced this issue Sep 21, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants