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 color support for Windows 10 #107

Merged
merged 1 commit into from
Aug 14, 2019
Merged

Fix color support for Windows 10 #107

merged 1 commit into from
Aug 14, 2019

Conversation

ob-stripe
Copy link
Contributor

Reviewers

r? @brandur-stripe @aarongreen-stripe @tomer-stripe
cc @stripe/dev-platform

Summary

The Windows console does not support ANSI color codes, resulting in strange characters in the output (cf. #93). With Windows 10, the console can support ANSI colors, but support must be explicitly enabled.

This PR does that by using some code adapted from this comment: sirupsen/logrus#496 (comment).

It also changes the spinner charset to use standard ASCII characters on Windows, since the default console font does not support the fancy characters.

Fixes #93 (to an extent).

Copy link

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing. LGTM!

@ob-stripe ob-stripe merged commit bdce130 into master Aug 14, 2019
@ob-stripe ob-stripe deleted the ob-fix-color-win10 branch August 14, 2019 23:58
@ob-stripe
Copy link
Contributor Author

Released as v0.4.4.

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

Successfully merging this pull request may close these issues.

Windows command line showing invalid characters
5 participants