fix: Enhance subprocess calls with UTF-8 encoding and error handling
This commit is contained in:
parent
fb82d8d612
commit
ad6e388dc8
2 changed files with 28 additions and 4 deletions
|
|
@ -21,6 +21,12 @@ import sys
|
|||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
# Enable UTF-8 output on Windows
|
||||
if sys.platform == "win32":
|
||||
import io
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
|
||||
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8")
|
||||
|
||||
# Import shared version utilities
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent / "build" / "scripts"))
|
||||
from version_utils import get_current_version, get_project_root
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue