mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.
GNU General Public License v3.0
539 stars 48 forks source link

regression on detection of python bin #126

Closed mr-majkel closed 8 months ago

mr-majkel commented 8 months ago

With the changes done in #121, .env is used as one of the potential candidates for the directory containing python binary, however it is quite common used as file for storing environment variables that can be automatically sourced by different frameworks and tools. These include docker-compose, as well as python packages like python-dotenv, or django.

I would like to suggest a change that would check if the file found is a directory before actually trying to use it for python binary lookup.

mfussenegger commented 8 months ago

Thanks for pointing out. I added an additional directory check: https://github.com/mfussenegger/nvim-dap-python/pull/128

If that still causes problem let me know - I'd have to add another check on the full python path