Skip to content

Uncaught exception on unexisting folder #238

@foxyseta

Description

@foxyseta
$ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions