mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 12:52:37 +02:00
update: terminal初始化的时候把环境变量给过去
This commit is contained in:
parent
214688dc77
commit
a7733fb4b2
1 changed files with 3 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import os
|
||||
import subprocess
|
||||
import threading
|
||||
from queue import Queue
|
||||
|
|
@ -19,6 +20,7 @@ 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,
|
||||
|
|
@ -27,6 +29,7 @@ class Terminal:
|
|||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
executable="/bin/bash",
|
||||
env=env
|
||||
)
|
||||
self.stdout_queue = Queue()
|
||||
self.observer = TerminalReporter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue