fix: remove os.path.basename from _get_git_branch() (#4783)

This commit is contained in:
doronz88 2022-04-27 19:41:13 +03:00 committed by GitHub
parent 73a880f76a
commit 22cb921686
Failed to generate hash of commit
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,23 @@
**Added:**
* <news item>
**Changed:**
* fix: remove os.path.basename from _get_git_branch()
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* <news item>
**Security:**
* <news item>

View file

@ -37,7 +37,7 @@ def _get_git_branch(q):
with contextlib.suppress(subprocess.CalledProcessError, OSError):
branch = xt.decode_bytes(_run_git_cmd(cmds.split()))
if branch:
q.put(os.path.basename(branch.splitlines()[0]))
q.put(branch.splitlines()[0])
return
# all failed
q.put(None)