diff --git a/deploy.py b/deploy.py index ff57f1c..554ecf3 100644 --- a/deploy.py +++ b/deploy.py @@ -29,8 +29,8 @@ from pathlib import Path # 强制 stdout/stderr 使用 UTF-8 编码,避免 Windows GBK 编码错误 if hasattr(sys.stdout, 'buffer'): - sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') - sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace') + sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace', line_buffering=True) + sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace', line_buffering=True) # ============================================================================ # 配置