Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception on unexisting folder #238

Open
foxyseta opened this issue Dec 29, 2022 · 0 comments
Open

Uncaught exception on unexisting folder #238

foxyseta opened this issue Dec 29, 2022 · 0 comments

Comments

@foxyseta
Copy link

$ gitinspector unexisting-folder
Traceback (most recent call last):
  File "/usr/local/bin/gitinspector", line 24, in <module>
    gitinspector.main()
  File "/usr/local/lib/node_modules/gitinspector/gitinspector/gitinspector.py", line 140, in main
    repos = __get_validated_git_repos__(set(args))
  File "/usr/local/lib/node_modules/gitinspector/gitinspector/gitinspector.py", line 121, in __get_validated_git_repos__
    cloned_repo.location = basedir.get_basedir_git(cloned_repo.location)
  File "/usr/local/lib/node_modules/gitinspector/gitinspector/basedir.py", line 35, in get_basedir_git
    os.chdir(path)
OSError: [Errno 2] No such file or directory: '/home/foxy/unexisting-folder'

This could be handles via an error message, so a simple exception catch would do the trick. I am willing to open a PR if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant