Skip to content

Commit

Permalink
fixed version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Nov 19, 2023
1 parent fd805a0 commit 3af5e29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib50/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,8 @@ def check_dependencies():
raise Error(_("You don't have git. Install git, then re-run!"))

# Check that git --version > 2.7
version = subprocess.check_output(["git", "--version"]).decode("utf-8")
matches = re.search(r"^git version (\d+\.\d+\.\d+).*$", version)
_version = subprocess.check_output(["git", "--version"]).decode("utf-8")
matches = re.search(r"^git version (\d+\.\d+\.\d+).*$", _version)
if not matches or version.parse(matches.group(1)) < version.parse("2.7.0"):
raise Error(_("You have an old version of git. Install version 2.7 or later, then re-run!"))

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
python_requires=">= 3.6",
packages=["lib50"],
url="https://github.com/cs50/lib50",
version="3.0.9",
version="3.0.10",
include_package_data=True
)

0 comments on commit 3af5e29

Please sign in to comment.