Merge branch 'terminal_env_fix' into 'mgx_ops'

update: 环境变量去掉,mgx backend已经支持

See merge request pub/MetaGPT!160
This commit is contained in:
张雷 2024-06-11 10:05:54 +00:00
commit 8aa4c970d9

View file

@ -1,4 +1,3 @@
import os
import subprocess
import threading
from queue import Queue
@ -20,7 +19,6 @@ class Terminal:
self.shell_command = ["bash"] # FIXME: should consider windows support later
self.command_terminator = "\n"
env = dict(os.environ)
# Start a persistent shell process
self.process = subprocess.Popen(
self.shell_command,
@ -28,8 +26,7 @@ class Terminal:
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
executable="/bin/bash",
env=env
executable="/bin/bash"
)
self.stdout_queue = Queue()
self.observer = TerminalReporter()