gdamore / tcell

Tcell is an alternate terminal package, similar in some ways to termbox, but better in others.
Apache License 2.0
4.59k stars 310 forks source link

fixes #716 Improve missing terminal error message. #717

Closed spearson78 closed 4 weeks ago

spearson78 commented 7 months ago

When running in debug mode in VS Code under Linux the Application.Run() method returns an *os/exec.ExitError . This is very confusing and makes tracking down the root cause difficult.

The issue is caused by the default debug environment in VS Code not launching in a terminal.

The error message can be improved by returning an ErrTermNotFound in the case of an empty $TERM environment variable. Hopefully a better error message will lead users to identify the lack of a terminal as the root cause of the problem.

spearson78 commented 7 months ago

I am willing to either further improve the error message or the project documentation to help users avoid this issue in the future.