Skip to content

Commit

Permalink
Force color
Browse files Browse the repository at this point in the history
  • Loading branch information
wbreza committed Oct 14, 2024
1 parent 2be5090 commit 02b3d48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/azd/cmd/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/azure/azure-dev/cli/azd/pkg/input"
"github.com/azure/azure-dev/cli/azd/pkg/ioc"
"github.com/azure/azure-dev/cli/azd/pkg/lazy"
"github.com/fatih/color"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -122,6 +123,11 @@ func (a *extensionAction) Run(ctx context.Context) (*actions.ActionResult, error
allEnv := []string{}
allEnv = append(allEnv, os.Environ()...)

forceColor := !color.NoColor
if forceColor {
allEnv = append(allEnv, "FORCE_COLOR=1")
}

env, err := a.lazyEnv.GetValue()
if err == nil && env != nil {
allEnv = append(allEnv, env.Environ()...)
Expand Down

0 comments on commit 02b3d48

Please sign in to comment.