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

Fix: UnboundLocalError: local variable 'version_type' referenced before assignment #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

furushchev
Copy link

vcs validate fails if version is referred to git hash due to unbounded variable error like below.

=== <package> (git) ===
Invocation of command 'validate' on client 'git' failed: UnboundLocalError: local variable 'cmd' referenced before assignment (/usr/lib/python3/dist-packages/vcstool/clients/git.py:736)

@EWouters
Copy link

EWouters commented Aug 3, 2022

I experienced this error as well, but this doesn't correctly fix the issue. In my case with the patch (3c0d370) it will return a hash, while my repo does have a tag checked out.

It turns out my repo has multiple tags, A and B, that point to the same commit. In the repos.yaml file tag A is requested but the repo seems to report tag B is checked out.

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

Successfully merging this pull request may close these issues.

2 participants