Skip to content

Commit

Permalink
fix(cli): cli encoding error on Windows (#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
bojiang authored Jun 11, 2022
1 parent ce0c9af commit e0d0f7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bentoml/_internal/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import click
import psutil

from bentoml import __version__ as BENTOML_VERSION

Expand Down Expand Up @@ -30,6 +31,11 @@ def cli():
add_serve_command(cli)
add_containerize_command(cli)

if psutil.WINDOWS:
import sys

sys.stdout.reconfigure(encoding="utf-8") # type: ignore

return cli


Expand Down

0 comments on commit e0d0f7f

Please sign in to comment.