diff --git a/metagpt/roles/di/engineer2.py b/metagpt/roles/di/engineer2.py index 6f3dcd149..beb240a66 100644 --- a/metagpt/roles/di/engineer2.py +++ b/metagpt/roles/di/engineer2.py @@ -141,8 +141,7 @@ class Engineer2(RoleZero): return f"The file {path} has been successfully created, with content:\n{code}" def deploy_to_public(self, dist_dir): - """fix the path to absolute path""" - # fix the path according to the editor's working directory + """fix the dist_dir path to absolute path before deploying""" dist_dir = self.editor._try_fix_path(dist_dir) return self.deployer.deploy_to_public(dist_dir) diff --git a/metagpt/tools/libs/deployer.py b/metagpt/tools/libs/deployer.py index 4f1ac0ecf..2b4d996d1 100644 --- a/metagpt/tools/libs/deployer.py +++ b/metagpt/tools/libs/deployer.py @@ -12,7 +12,7 @@ class Deployer: async def static_server(self, src_path: str) -> str: """This function will be implemented in the remote service.""" - return f"http://127.0.0.1:{8000}/index.html" + return "http://127.0.0.1:8000/index.html" async def deploy_to_public(self, dist_dir: str): """ diff --git a/metagpt/tools/libs/terminal.py b/metagpt/tools/libs/terminal.py index 0150e26e6..e8eeb363c 100644 --- a/metagpt/tools/libs/terminal.py +++ b/metagpt/tools/libs/terminal.py @@ -68,10 +68,10 @@ class Terminal: output = "" # Remove forbidden commands for cmd_name, reason in self.forbidden_commands.items(): - # 'true' is a pass command in linux terminal. + # "true" is a pass command in linux terminal. if cmd_name in cmd: cmd = cmd.replace(cmd_name, "true") - output += f"{cmd_name} is failed to executed. {reason}\n" + output += f"Failed to execut {cmd_name}. {reason}\n" # Send the command self.process.stdin.write((cmd + self.command_terminator).encode())