fix(ui): no longer attempt to read from stdin if non-tty (#8333)
### Description
Fixes #8323
The TUI was crashing as it was failing when attempting to read from
`stdin` that was closed by `pre-commit`. The fix is to not read from
`stdin` if there isn't user input coming from there.
### Testing Instructions
Closing `stdin` should no longer cause `turbo` to crash if stdout is
still a TTY e.g. `turbo_dev build < /dev/null`
Also verify that reproduction
https://github.com/isaacharrisholt/turborepo-precommit-bug/tree/main no
longer crashes when using changes from this PR.