Skip to content

Commit a55f416

Browse files
authored
Fixed install check for git pre-release versions (#600)
May fix #599. Installer going down path of checking git, and splitting a variable that wasn't tested for 'None`. Added guard, which fixed 3 broken unit tests.
1 parent b4dab33 commit a55f416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/databricks/labs/ucx/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def _version(self):
776776
dv = SemVer.parse(git_detached_version)
777777
datestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
778778
# new commits on main branch since the last tag
779-
new_commits = dv.pre_release.split("-")[0]
779+
new_commits = dv.pre_release.split("-")[0] if dv.pre_release else None
780780
# show that it's a version different from the released one in stats
781781
bump_patch = dv.patch + 1
782782
# create something that is both https://semver.org and https://peps.python.org/pep-0440/

0 commit comments

Comments
 (0)