Skip to content

Commit 1f8a34d

Browse files
committed
Fix branch not being a string in auto detection
1 parent a76356c commit 1f8a34d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.2.19"
9+
version = "2.2.20"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.2.19'
2+
__version__ = '2.2.20'
33
USER_AGENT = f'SocketPythonCLI/{__version__}'

socketsecurity/core/git_interface.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def __init__(self, path: str):
9797
else:
9898
# Try to get branch name from git properties
9999
try:
100-
self.branch = self.head.reference
101-
urllib.parse.unquote(str(self.branch))
100+
self.branch = urllib.parse.unquote(str(self.head.reference))
102101
log.debug(f"Branch detected from git reference: {self.branch}")
103102
except Exception as error:
104103
log.debug(f"Failed to get branch from git reference: {error}")

0 commit comments

Comments
 (0)