mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix: reliably kill shell process tree on Windows timeout Fixes #8809 * fix: remove redundant import and wrap taskkill in try/except - Remove 'import subprocess as _sp' (subprocess already imported at top) - Use subprocess.run directly with DEVNULL for stdout/stderr - Wrap taskkill in try/except to avoid masking original TimeoutExpired - If taskkill fails, cleanup failures don't prevent proc.wait() or re-raise https://buymeacoffee.com/muhamedfazalps * style: apply ruff formatting to local.py * test: fix shell component tests to match Popen-based implementation The tests were monkeypatching subprocess.run but the implementation now uses subprocess.Popen + communicate() for timeout handling. Updated tests to mock Popen instead. Fixes CI Unit Tests failure * fix: harden windows shell timeout cleanup --------- Co-authored-by: Soulter <905617992@qq.com>
3.8 KiB
3.8 KiB