Skip to content

Commit

Permalink
Retrieve branch name as ascii, not bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
thclark authored Jul 28, 2020
1 parent e810d9c commit 411dcb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pre_commit_hooks/check_branch_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
help='Valid regexes for a branch name',
)

current_branch_name = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
current_branch_name = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip()

args = parser.parse_args(argv)
for regexp in args.regexes:
Expand Down

0 comments on commit 411dcb6

Please sign in to comment.