mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 03:57:24 +00:00
dev_container: Always pass tty to docker if available
This allows programs to use colors and other tty features. It also fixes issues with stdout being buffered instead of printed in real time. BUG=b:246623045 TEST=./tools/dev_container ./tools/health-check --all -v Change-Id: I09dd7523a15fbd8b3c5c653471ef091eac75cf6d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892522 Commit-Queue: Dennis Kempin <denniskempin@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
33f90e6eb0
commit
60911dbc02
1 changed files with 3 additions and 0 deletions
|
@ -170,6 +170,9 @@ def main(
|
|||
if not sys.stdin.isatty():
|
||||
raise Exception("Trying to run an interactive session in a non-interactive terminal.")
|
||||
tty_args = ["--interactive", "--tty"]
|
||||
elif sys.stdin.isatty():
|
||||
# Even if run non-interactively, we do want to pass along a tty for proper output.
|
||||
tty_args = ["--tty"]
|
||||
|
||||
# Start an interactive shell by default
|
||||
if hermetic:
|
||||
|
|
Loading…
Reference in a new issue