diff options
author | Keenan Brock <keenan@thebrocks.net> | 2023-04-24 15:33:54 -0400 |
---|---|---|
committer | Keenan Brock <keenan@thebrocks.net> | 2023-04-24 15:51:46 -0400 |
commit | ec1885893dc2bb863b4858a110ad86abf7ee4612 (patch) | |
tree | ce71b221d7f759d2e199a93e61d557905b6c7815 /site | |
parent | 7ebab0711106a76cace8b81e74f8c540a9a5dc60 (diff) | |
download | highline-ec1885893dc2bb863b4858a110ad86abf7ee4612.tar.gz |
Do not call stty on non-tty
When testing on a non-tty (e.g.: github actions),
either one of these lines produces an error:
```ruby
input.echo = true
ask("question", "y") { |q| q.readline = true }
```
The error is produced by ruby internals:
```bash
echo | rake | cat
......stty: stdin isn't a terminal......
```
This change skips the stty calls if the input is not on a tty, so the
errors will not be produced.
Diffstat (limited to 'site')
0 files changed, 0 insertions, 0 deletions