docs: fix version specific note on local build

This commit is contained in:
Marius Vikhammer
2020-08-19 11:06:37 +08:00
committed by bot
parent 7e2511f8a8
commit 3a95cf733f

View File

@@ -207,7 +207,7 @@ def get_version():
return (branch, "branch", False)
# Try to find the branch name even if docs are built locally
branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode('utf-8')
branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode('utf-8')
if branch != "HEAD":
return (branch, "branch", False)