1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Fix ambuild script error when using branch name with utf-8 chars

This commit is contained in:
Nick Hastings 2023-05-16 16:20:53 -04:00
parent d62379244c
commit 2e43b26539

View File

@ -16,7 +16,7 @@ outputs = [
os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h')
]
with open(os.path.join(builder.sourcePath, '.git', 'HEAD')) as fp:
with open(os.path.join(builder.sourcePath, '.git', 'HEAD'), encoding='utf-8') as fp:
head_contents = fp.read().strip()
if re.search('^[a-fA-F0-9]{40}$', head_contents):
git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD')