gosuri / uilive

uilive is a go library for updating terminal output in realtime
MIT License
1.7k stars 87 forks source link

getTermSize return 0 when no tty with process #23

Closed Honglei-Cong closed 5 years ago

Honglei-Cong commented 5 years ago

when program is started by supervisord, there's no tty associated its process.
os.Exit(1) makes process failed.

The fix is to return 0 windows size when there's no tty.

HairyMike commented 5 years ago

This works with pty on docker. docker run instead of docker run -t. Also works within unit test debugging session.

It gets my vote to merge to master.

HairyMike commented 5 years ago

Looks like this has been done as part of this commit: https://github.com/gosuri/uilive/commit/4512d98b127f3f3a1b7c3cf1104969fdd17b31d9