From d1a9a51bb869ac9c83bd786a193bac30fcd6d3f8 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Wed, 24 Jun 2026 17:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(terminal=5Fops):=20ssh=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E4=B8=AD=E9=81=BF=E5=85=8D=E9=87=8D=E5=86=99?= =?UTF-8?q?=20/Library/Developer/CommandLineTools/Library/Frameworks/Pytho?= =?UTF-8?q?n3.framework/Versions/3.9/bin/python3.9/pip=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/terminal_ops/run.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/terminal_ops/run.py b/modules/terminal_ops/run.py index 95f457c..b8e5746 100644 --- a/modules/terminal_ops/run.py +++ b/modules/terminal_ops/run.py @@ -414,12 +414,15 @@ class RunMixin: execution_in_container = self._will_use_container(session_override) python_rewrite = self.container_python_cmd if execution_in_container else self.python_cmd pip_rewrite = self._derive_pip_from_python(python_rewrite) - # 统一替换 python/python3,为保障虚拟环境命中只替换独立单词 - if re.search(r"\bpython3?\b", command): - command = re.sub(r"\bpython3?\b", python_rewrite, command) - # 同步替换 pip/pip3,确保指向同一环境 - if re.search(r"(?