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

nodemon output doesn't respect console colours with msysgit #95

Closed
steveworkman opened this issue May 4, 2012 · 13 comments
Closed

nodemon output doesn't respect console colours with msysgit #95

steveworkman opened this issue May 4, 2012 · 13 comments

Comments

@steveworkman
Copy link

Hi Remy,

Really, really small cosmetic bug (lowest of low priority), but with msysgit on Win 7 x64 the nodemon process outputs the standard grey on black colours to the terminal. That's normally fine, but I've got the console to be black on white so I can tell which window the server console is! Twitpic here: http://t.co/0Eb85BoF

In the picture, the top set of output is from the standard node runtime.

It's just a tad annoying. If you need me to do any testing just let me know.

@remy
Copy link
Owner

remy commented May 31, 2012

Yeah, I've looked at this, and actually the log is doing a "text reset": \x1B[0m - but I can see it's resetting you right back to black. I'm not quite sure what to do. I could remove the colour highlighting, but it would lost the red and green notice. I could just not do a reset, but I'd worry your cursor would be left red or green!

Let me think about it - equally if you have any ideas...

@mikeerickson
Copy link

Any chance this has received some attention.... My usually pretty console is so drab :-)

@remy Thank you VERY VERY much for nodemon

@remy
Copy link
Owner

remy commented Aug 26, 2013

I can include a test in the new code base I'm working on (previously
difficult to test and isolate - but now should be much easier to maintain,
though it's still a little way off of being released): #200

On Monday, August 26, 2013, Mike Erickson wrote:

Any chance this has received some attention.... My usually pretty console
is so drab :-)

@remy https:/remy Thank you VERY VERY much for nodemon


Reply to this email directly or view it on GitHubhttps://issues/95#issuecomment-23238656
.

— Remy

@remy
Copy link
Owner

remy commented Dec 30, 2013

Is this still an issue? If so, I can add a config option to remove nodemon colours.

@steveworkman
Copy link
Author

Not a clue sadly, I've moved jobs and don't have that laptop any more. Perhaps @mikeerickson can test for you

@remy
Copy link
Owner

remy commented Jan 19, 2014

I'm going to close this as we can't confirm whether it's still an issue or not. I suspect it is, but can't test myself.

@remy remy closed this as completed Jan 19, 2014
@mikeerickson
Copy link

Hey guys... I will give this a try tomorrow.

@Janpot
Copy link

Janpot commented Feb 11, 2014

Just updated my nodemon to 1.0.14 and lost all colors in the logs.

@rukmal
Copy link

rukmal commented Apr 30, 2014

Hi guys, is it possible to address this issue? I am willing to help out if (when) I figure out where colors are handled

@chris-prince
Copy link

I can confirm that nodemon 1.2.0 still alters some colors in a Windows command prompt. For example, change the default text to black-on-maroon by running color 50. When you run nodemon, the colored text looks fine, but the plain text becomes gray-on-maroon, instead of black-on-maroon. (Note that the background color is fine in both cases.)

Strangely, if you pipe the nodemon output into any msys tool -- even a bare cat statement -- the problem goes away and all text is colored correctly (!).

@chris-prince
Copy link

Hm, the problem I described may be due to node rather than nodemon. I suspect that node may not correctly capture the existing Windows terminal colors at startup, but that recent msys tools (v0.6.2) do. And so the escape code being sent to restore the foreground color ([39m) works fine when an msys tool is last in the chain, but not when node / nodemon is last before text hits the console.

@matanshukry
Copy link
Contributor

I am having this problem as well; I tried tracking it down, and reached to nodejs.
Specifically this issue : nodejs/node#2333

as far as I can tell, if I'm adding the line

process.stdout.isTTY = true;

at the start of my app, all colors outputs are working.

So the issue persists, but as far as I can tell it's a nodejs issue and not a nodemon one.

p.s.
due to some packages dependencies, I am using an older version of nodejs. However, as far as I can tell from the issue I posted, upgrading wouldn't help.

@remy
Copy link
Owner

remy commented Sep 26, 2015

You can disable colours using --no-colors through the cli, or add it as an option using noColors: true (on the latest nodemon@^1.7.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants