Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix e2b env (#1670)

Robert Brennan96151d914723
diff --git a/opendevin/runtime/e2b/runtime.py b/opendevin/runtime/e2b/runtime.py
index 180bf418f7..bc9a1cb264 100644
--- a/opendevin/runtime/e2b/runtime.py
+++ b/opendevin/runtime/e2b/runtime.py
@@ -31,6 +31,9 @@ class E2BRuntime(ServerRuntime):
return FileReadObservation(code_view, path=action.path)
async def write(self, action: FileWriteAction) -> Observation:
+ if action.start == 0 and action.end == -1:
+ self.filesystem.write(action.path, action.content)
+ return FileWriteObservation(content='', path=action.path)
files = self.filesystem.list(action.path)
if action.path in files:
all_lines = self.filesystem.read(action.path)
diff --git a/opendevin/runtime/e2b/sandbox.py b/opendevin/runtime/e2b/sandbox.py
index 3210d232fa..60cfe11a53 100644
--- a/opendevin/runtime/e2b/sandbox.py
+++ b/opendevin/runtime/e2b/sandbox.py
@@ -74,7 +74,7 @@ class E2BBox(Sandbox):
return '\n'.join([m.line for m in proc.output_messages])
def execute(self, cmd: str) -> Tuple[int, str]:
- process = self.sandbox.process.start(cmd, envVars=self._env)
+ process = self.sandbox.process.start(cmd, env_vars=self._env)
try:
process_output = process.wait(timeout=self.timeout)
except TimeoutException: