bndr / pipreqs

pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward.
Apache License 2.0
6.38k stars 388 forks source link

fix when calling from outside directory #309

Open marceloandrioni opened 2 years ago

marceloandrioni commented 2 years ago

Hello, tanks for the great package. The current directory is always included in the search path. This can be a problem when calling pipreqs from another directory (e.g.: pipreqs my_dir), as the current directory and the desired directory (my_dir) will be included in the search path. This PR ensures that only the desired directory is scanned.