Skip to content

Commit

Permalink
Force run_python_script and the child python to use UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
privet-kitty committed Oct 22, 2023
1 parent d35dd4e commit 2dd04cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/poetry/utils/env/base_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ def run_python_script(self, content: str, **kwargs: Any) -> str:
"-I",
"-W",
"ignore",
"-X",
"utf8",
"-",
input_=content,
stderr=subprocess.PIPE,
Expand All @@ -352,6 +354,7 @@ def _run(self, cmd: list[str], **kwargs: Any) -> str:
check=True,
env=env,
text=True,
encoding="utf-8",
**kwargs,
).stdout
elif call:
Expand Down

0 comments on commit 2dd04cf

Please sign in to comment.