mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-07 10:53:17 +02:00
Fix UnicodeDecodeError in git_check_deviation (#26439)
Fix UnicodeDecodeError in git_check_deviation Decode git log output to bytes to prevent Unicode errors.
This commit is contained in:
@@ -134,7 +134,8 @@ def git_check_deviation(active_branch):
|
||||
"""Return True if branch has custom commits
|
||||
"""
|
||||
cli.run(['git', 'fetch', 'upstream', active_branch])
|
||||
deviations = cli.run(['git', '--no-pager', 'log', f'upstream/{active_branch}...{active_branch}'])
|
||||
# As we only care about exit code, decode to bytes to avoid UnicodeDecodeError
|
||||
deviations = cli.run(['git', '--no-pager', 'log', f'upstream/{active_branch}...{active_branch}'], text=False)
|
||||
return bool(deviations.returncode)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user