소스 검색

Use errors='replace' with subprocess (#3096)

Masen Furer 1 년 전
부모
커밋
5466d0d9a6
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      reflex/utils/processes.py

+ 1 - 0
reflex/utils/processes.py

@@ -145,6 +145,7 @@ def new_process(args, run: bool = False, show_logs: bool = False, **kwargs):
         "stdout": None if show_logs else subprocess.PIPE,
         "universal_newlines": True,
         "encoding": "UTF-8",
+        "errors": "replace",  # Avoid UnicodeDecodeError in unknown command output
         **kwargs,
     }
     console.debug(f"Running command: {args}")