IngoMeyer441 / simple-term-menu

A Python package which creates simple interactive menus on the command line.
MIT License
492 stars 43 forks source link

Cannot import library without TERM env variable #83

Closed redtomato74 closed 10 months ago

redtomato74 commented 10 months ago

Hi,

We cannot import simple-term-menu package anymore since it checks for TERM environment variable. I understand, that TERM might be required for this package to work, but the missing variable shouldn't block import right away, right?

For example, some script can accept parameters both as options and in interactive mode, we use the first way in CI and the second way while running locally. Checking for TERM breaks all CI builds, just because code checks for TERM variable on import. Plus that change was introduced in a patch version update.

Can you please fix this (for example by moving that check deeper, to some function/method, which actually relies on real terminal)?

Thanks

IngoMeyer441 commented 10 months ago

Thanks for the issue. This is fixed in release v1.6.3. Please reopen, if you still have any problems left.

redtomato74 commented 10 months ago

Wow, that was fast, thanks a lot!