You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Changes
All prompting logic under `cmd/` now uses a single `IsPromptSupported()`
function instead of ad-hoc TTY checks:
### Before
Callers checked various combinations:
- `IsInTTY(ctx) && IsOutTTY(ctx)`
- `!IsInTTY(ctx)`
- `IsOutTTY(ctx) && IsInTTY(ctx) && !IsGitBash(ctx)`
### After
All callers use:
```go
if cmdio.IsPromptSupported(ctx) {
// prompt user
} else {
// return error or use non-interactive fallback
}
```
### Behavior Changes
Prompting now requires ALL of:
- Interactive mode (no dumb terminal, no NO_COLOR)
- stdin to be a TTY (for reading input)
- stdout to be a TTY (for showing prompts)
- Not running in Git Bash on Windows
This prevents prompting in edge cases that weren't properly handled
before (e.g., TTY stdin with piped stdout).
## Why
Higher level capability checks mean we can more easily swap out what we
do for terminal I/O.
## Tests
Existing tests pass.
Manually ran `configure` and `auth login` commands.
0 commit comments