Skip to content

Commit a0c7604

Browse files
authored
Decode error message so that it is printed correctly (#27)
* Decode error message so that it is printed correctly * CI fix
1 parent dd401d3 commit a0c7604

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doltcli/dolt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _execute(args: List[str], cwd: Optional[str] = None, outfile: Optional[str]
7777
proc = Popen(args=_args, cwd=cwd, stdout=f, stderr=PIPE)
7878
else:
7979
proc = Popen(args=_args, cwd=cwd, stdout=PIPE, stderr=PIPE)
80-
out, err = proc.communicate()
80+
out, err = (val.decode("utf8") if val else "" for val in proc.communicate())
8181
exitcode = proc.returncode
8282

8383
if exitcode != 0:
@@ -87,7 +87,7 @@ def _execute(args: List[str], cwd: Optional[str] = None, outfile: Optional[str]
8787
if outfile:
8888
return outfile
8989
else:
90-
return out.decode("utf-8")
90+
return out
9191

9292

9393
class Status(StatusT):

0 commit comments

Comments
 (0)