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
{{ message }}
Repository navigation
bug: The TTY detection identifies /dev/null as a terminal #12
Blocker: no. This can wait. Do this with the Docker capability.
Defect
isInteractive (internal/docker/compose.go:15-18) examines only stdout. It uses os.ModeCharDevice.
/dev/null is a character device. Thus, isInteractive returns true for /dev/null. A test gave this result.
Cron jobs frequently send output to /dev/null. For these jobs, the CLI does not add -T to docker compose exec.
The function does not examine stdin.
Cost
With Docker Compose v5.1.1, a cron-style call with stdin and stdout on /dev/null operated correctly. Thus, the effect is small on current Compose versions.
The effect on older Compose versions is not known.
Benefit of the fix
The CLI identifies a terminal correctly in all conditions.
The behavior does not depend on the Compose version.
Fix
Use go-isatty on stdin and stdout. go-isatty is already in the dependency tree.
changed the title [-]The TTY detection identifies /dev/null as a terminal[/-][+]bug: The TTY detection identifies /dev/null as a terminal[/+]on Oct 1, 2026
Activity
[-]The TTY detection identifies /dev/null as a terminal[/-][+]bug: The TTY detection identifies /dev/null as a terminal[/+]