This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failure to start on version reading, if .git dir is missing or Gi…
…tPython is not installed"
- Loading branch information
a8da371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @srevinsaju :) This did not solve version reading issue for me.
The problem actually occurs when running
git
in order to read the version from a non existent .git directory. However the current fix only checks if theGitPython
module can be imported. So in the case whereGitPython
is available but there is not a.git
directory the version reading still fails.You could add right after something like:
a8da371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm, actually it would be better to add this check before importing
GitPython
. So you don't import this module if it is not needed, i.e. if there is not.git
history.a8da371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@niess. Thanks, I might be dumb. Yes, after logically thing about what you have told, my fix looks sick. I have pushed another fix: 6d62911, please let me know, if that works for you. I apologize. I am still a student coder lol.
a8da371
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srevinsaju No worry. You are doing a great job :) The task is complex. The devil is in the details.