fix: conditionally pass -t flag to docker exec based on TTY detection by jlaneve · Pull Request #2023 · astronomer/astro-cli

@jlaneve @claude

The -it flags were hardcoded in docker exec calls, causing "the input
device is not a TTY" errors in non-interactive environments like CI/CD
pipelines, IDE terminals, cron jobs, and piped shells.

Now only passes -t when stdin is actually a terminal, while always
keeping -i for stdin attachment. Fixes both AirflowCommand() (used by
airflow_settings.yaml import for pools/connections/variables) and
Bash() (used by astro dev bash).

Closes #2022

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

jeremybeard

@jlaneve jlaneve deleted the fix/tty-detection-docker-exec branch

March 3, 2026 15:13