Skip to content

Commit

Permalink
fix: syntax highlighting (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Jun 7, 2024
1 parent ce9383f commit 710f373
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion action/config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (c *Config) Load(ctx *cli.Context) error {
// and if it is set in the context
if strings.Contains(f, internal.FlagColorTheme) &&
!ctx.IsSet(internal.FlagColorTheme) &&
len(config.ColorFormat) > 0 {
len(config.ColorTheme) > 0 {
// set the color theme field to value from config
err = ctx.Set(internal.FlagColorTheme, config.ColorTheme)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/vela-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ func main() {
&cli.StringFlag{
EnvVars: []string{"VELA_COLOR_FORMAT"},
Name: internal.FlagColorFormat,
Usage: "enable or disable color output",
Usage: "overrides the output color format (default: terminal256)",
},

&cli.StringFlag{
EnvVars: []string{"VELA_COLOR_THEME"},
Name: internal.FlagColorTheme,
Usage: "configures the output color theme",
Usage: "configures the output color theme (default: monokai)",
},
}

Expand Down
2 changes: 2 additions & 0 deletions command/settings/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/go-vela/cli/action/settings"
"github.com/go-vela/cli/internal"
"github.com/go-vela/cli/internal/client"
"github.com/go-vela/cli/internal/output"
)

// CommandView defines the command for inspecting the platform settings record.
Expand Down Expand Up @@ -62,6 +63,7 @@ func view(c *cli.Context) error {
s := &settings.Config{
Action: internal.ActionView,
Output: c.String(internal.FlagOutput),
Color: output.ColorOptionsFromCLIContext(c),
}

// validate settings configuration
Expand Down

0 comments on commit 710f373

Please sign in to comment.