Skip to content

Commit

Permalink
Make TTY output a forceable thing
Browse files Browse the repository at this point in the history
  • Loading branch information
weikanglim committed Sep 16, 2024
1 parent 04976ae commit 11f19d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/azd/pkg/input/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -1056,9 +1056,9 @@ func NewConsole(
// IsTerminal returns true if the given file descriptors are attached to a terminal,
// taking into account of environment variables that force TTY behavior.
func IsTerminal(stdoutFd uintptr, stdinFd uintptr) bool {
// User override to force non-TTY behavior
if ok, _ := strconv.ParseBool(os.Getenv("AZD_DEBUG_FORCE_NO_TTY")); ok {
return false
// User override to force TTY behavior
if forceTty, err := strconv.ParseBool(os.Getenv("AZD_FORCE_TTY")); err == nil {
return forceTty
}

// By default, detect if we are running on CI and force no TTY mode if we are.
Expand Down

0 comments on commit 11f19d1

Please sign in to comment.