From bfc039a9a9f155d5b2269246b01e62b10dadde61 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Mon, 20 Jul 2026 15:51:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(terminal):=20=E7=A7=BB=E9=99=A4=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E6=89=A7=E8=A1=8C=E5=89=8D=E7=9A=84=20python/pip=20?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=87=8D=E5=86=99=EF=BC=8C=E6=8C=89=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8E=9F=E5=A7=8B=E5=91=BD=E4=BB=A4=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_command 与后台 run_command 此前会把命令中的 python/python3/pip/pip3 正则替换为解析出的容器或本地解释器路径,删除该重写逻辑后命令按原样执行。 --- modules/background_command_manager.py | 8 -------- modules/terminal_ops/run.py | 15 --------------- 2 files changed, 23 deletions(-) diff --git a/modules/background_command_manager.py b/modules/background_command_manager.py index 22cc2ab4..ae3820bb 100644 --- a/modules/background_command_manager.py +++ b/modules/background_command_manager.py @@ -3,7 +3,6 @@ from __future__ import annotations import os -import re import shutil import signal import subprocess @@ -61,14 +60,7 @@ class BackgroundCommandManager: if not getattr(terminal_ops, "container_session", None): session_override = terminal_ops._resolve_active_container_session() - execution_in_container = terminal_ops._will_use_container(session_override) - python_rewrite = terminal_ops.container_python_cmd if execution_in_container else terminal_ops.python_cmd - pip_rewrite = terminal_ops._derive_pip_from_python(python_rewrite) final_command = command - if re.search(r"\bpython3?\b", final_command): - final_command = re.sub(r"\bpython3?\b", python_rewrite, final_command) - if re.search(r"(?