mirror of
https://github.com/git-chglog/git-chglog.git
synced 2026-08-03 08:12:22 +00:00
support Windows colors
This commit is contained in:
parent
c284c96eae
commit
9067d95bd7
2 changed files with 7 additions and 5 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/mattn/go-colorable"
|
||||
gitcmd "github.com/tsuyoshiwada/go-gitcmd"
|
||||
)
|
||||
|
||||
|
|
@ -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),
|
||||
questioner: questioner,
|
||||
configBuilder: configBuilder,
|
||||
templateBuilder: templateBuilder,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/mattn/go-colorable"
|
||||
gitcmd "github.com/tsuyoshiwada/go-gitcmd"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
|
@ -120,8 +121,8 @@ func main() {
|
|||
initializer := NewInitializer(
|
||||
&InitContext{
|
||||
WorkingDir: wd,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
Stdout: colorable.NewColorableStdout(),
|
||||
Stderr: colorable.NewColorableStderr(),
|
||||
},
|
||||
fs,
|
||||
NewQuestioner(
|
||||
|
|
@ -141,8 +142,8 @@ func main() {
|
|||
chglogCLI := NewCLI(
|
||||
&CLIContext{
|
||||
WorkingDir: wd,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
Stdout: colorable.NewColorableStdout(),
|
||||
Stderr: colorable.NewColorableStderr(),
|
||||
ConfigPath: c.String("config"),
|
||||
OutputPath: c.String("output"),
|
||||
Silent: c.Bool("silent"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue