mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-13 16:10:05 +08:00
✨ feat(update): 移除资源管理器,重构更新逻辑,支持通过ZhenxunRepoManager进行资源和Web UI的更新
This commit is contained in:
@@ -57,11 +57,13 @@ async def run_git_command(
|
||||
"""
|
||||
try:
|
||||
full_command = f"git {command}"
|
||||
# 将Path对象转换为字符串
|
||||
cwd_str = str(cwd) if cwd else None
|
||||
process = await asyncio.create_subprocess_shell(
|
||||
full_command,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
cwd=cwd,
|
||||
cwd=cwd_str,
|
||||
)
|
||||
stdout_bytes, stderr_bytes = await process.communicate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user