medikoo/cli-color

Reset

stevenbeeckman opened this issue · 5 comments

Hi,

console.log(clc.bgBright.bgBlack.red(req.method + " " + req.url + ": notFound()") );

doesn't reset its background. Subsequent console.log() calls also have the bgBright.bgBlack background.

My current work-around: append \033[0m to the end of the console.log() call.

Sorry for late response, github after latest notifcation changes decided to notify me of new issues only via RSS feed ;-)

Anyway, I'm not able to reproduce that, and it definitely shouldn't behave like that. Can you provide more details about your environment: Node.js version, system you are using, and cli-color version (is it the latest?). Thanks!

cli-color version 0.1.7 on node.js version 0.6.19 on Windows Vista 64-bit
(sorry :))

On Thu, Sep 13, 2012 at 11:19 PM, Mariusz Nowak notifications@github.comwrote:

Sorry for late response, github after latest notifcation changes decided
to notify me of new issues only via RSS feed ;-)

Anyway, I'm not able to reproduce that, and it definitely shouldn't behave
like that. Can you provide more details about your environment: Node.js
version, system you are using, and cli-color version (is it the latest?).
Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-8543962.

I investigated that, and it looks that it's Node issue. Windows shell doesn't support ANSI colors by default, they're translated by Node into something that Windows shell understands, and that translator for some reason fails to reset background color when it's set as bright variant.

I've opened issue for that nodejs/node-v0.x-archive#4019 Let's see what Node folks say.

It all works well in *nix environment, so I suggest until we'll figure out a fix, use hack with 0 code as you explained.
I cannot take this hack into cli-color now, as it resets everything to default, so it may not play well for some cases.

Thanks!

..and it's now fixed in Node master, so I assume in v0.8.10, it will work ok :)

I'll upgrade Node then. Thanks!

Sent from a mobile device.

-----Original Message-----
From: Mariusz Nowak notifications@github.com
Date: Fri, 14 Sep 2012 09:37:40
To: medikoo/cli-colorcli-color@noreply.github.com
Reply-To: medikoo/cli-color reply@reply.github.com
Cc: stevenbeeckmansteven.beeckman+github@gmail.com
Subject: Re: [cli-color] Reset (#4)

...and it's now fixed in Node master, so I assume in v0.8.10, it will work ok :)


Reply to this email directly or view it on GitHub:
#4 (comment)