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

Fix terminal colors by reset console colors explicitly #1184

Merged
merged 1 commit into from
Jun 2, 2017
Merged

Fix terminal colors by reset console colors explicitly #1184

merged 1 commit into from
Jun 2, 2017

Conversation

rossipedia
Copy link
Contributor

Due to a bug in how Windows handles escape codes, the console output disappears after the version number (chalk/chalk#145 and microsoft/WSL#2174). Resetting the output explicitly fixes storybook output on Windows.

image

If I highlight my console output, you can see the text is still being output, but the colors are broken:

image

Due to a bug in how Windows handles escape codes, the console output disappears after the version number (chalk/chalk#145 and microsoft/WSL#2174). Resetting the output explicitly fixes storybook output on Windows.
@codecov
Copy link

codecov bot commented Jun 2, 2017

Codecov Report

Merging #1184 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1184   +/-   ##
=======================================
  Coverage   13.31%   13.31%           
=======================================
  Files         199      199           
  Lines        4588     4588           
  Branches      724      724           
=======================================
  Hits          611      611           
  Misses       3349     3349           
  Partials      628      628
Impacted Files Coverage Δ
app/react/src/server/index.js 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93bd3df...d97dbb2. Read the comment docs.

@ndelangen ndelangen merged commit 7b6c00c into storybookjs:master Jun 2, 2017
@ndelangen
Copy link
Member

Hey, thanks for this!

@ndelangen ndelangen changed the title reset console colors explicitly Fix terminal colors by reset console colors explicitly Jun 2, 2017
@ndelangen ndelangen added this to the v3.0.1 milestone Jun 2, 2017
@rossipedia rossipedia deleted the patch-1 branch June 3, 2017 02:10
@shilman
Copy link
Member

shilman commented Jun 3, 2017

@ndelangen @rossipedia There are many other places we're using chalk in the codebase, esp in @storybook/cli. Do we need to make these changes across the board?

@rossipedia
Copy link
Contributor Author

AFAIK, only specifically where chalk.bold is being used without an accompanying color. In my testing, using any color along with bold correctly reset the following text, but using bold with other non-color styles displayed the issue.

@shilman
Copy link
Member

shilman commented Jun 3, 2017

@rossipedia thanks for the clarification. Much appreciated!

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

Successfully merging this pull request may close these issues.

3 participants