-
Notifications
You must be signed in to change notification settings - Fork 239
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
support Windows colors #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mattn, Thank you for PR 😃
Since there was a point which I became interested in one point I commented on.
Also, the test has failed, but is it possible to fix it?
cmd/git-chglog/initializer.go
Outdated
@@ -30,7 +31,7 @@ func NewInitializer( | |||
return &Initializer{ | |||
ctx: ctx, | |||
fs: fs, | |||
logger: NewLogger(ctx.Stdout, ctx.Stderr, false, false), | |||
logger: NewLogger(colorable.NewColorableStdout(), colorable.NewColorableStderr(), false, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to use InitContext.Stdout
(and .Stderr
) in NewInitializer
, but do you have any special reasons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Reverted this part.
since InitContext should have Stdout/Stderr which is set as colorable
Pull Request Test Coverage Report for Build 27
💛 - Coveralls |
@mattn Thank you for fixing! merged 👍 |
What does this do / why do we need it?
git-chglog does not support Windows colors.
How this PR fixes the problem?
be nice
What should your reviewer look out for in this PR?
use go-colorable instead of native os.Stdout/os.Stderr. This doesn't break on Linux or macOS.
Check lists
Tests on Windows are already broken.