We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 478624e commit e98741cCopy full SHA for e98741c
commitizen/cmd.py
@@ -22,13 +22,15 @@ def _try_decode(bytes_: bytes) -> str:
22
try:
23
return bytes_.decode("utf-8")
24
except UnicodeDecodeError:
25
- charset_match = from_bytes(bytes_).best()
26
- if charset_match is None:
27
- raise CharacterSetDecodeError()
28
- try:
29
- return bytes_.decode(charset_match.encoding)
30
- except UnicodeDecodeError as e:
31
- raise CharacterSetDecodeError() from e
+ pass
+
+ charset_match = from_bytes(bytes_).best()
+ if charset_match is None:
+ raise CharacterSetDecodeError()
+ try:
+ return bytes_.decode(charset_match.encoding)
32
+ except UnicodeDecodeError as e:
33
+ raise CharacterSetDecodeError() from e
34
35
36
def run(cmd: str, env: Mapping[str, str] | None = None) -> Command:
0 commit comments