Skip to content

πŸ™Œ OpenHands: AI-Driven Development

add mkdir (#317)

Yufan Songdedd09fdf505
diff --git a/opendevin/sandbox/sandbox.py b/opendevin/sandbox/sandbox.py
index c3206dd8e1..91e45a77ad 100644
--- a/opendevin/sandbox/sandbox.py
+++ b/opendevin/sandbox/sandbox.py
@@ -94,9 +94,7 @@ class DockerInteractive:
else:
self.instance_id = str(uuid.uuid4())
if workspace_dir is not None:
- assert os.path.exists(
- workspace_dir
- ), f"Directory {workspace_dir} does not exist."
+ os.makedirs(workspace_dir, exist_ok=True)
# expand to absolute path
self.workspace_dir = os.path.abspath(workspace_dir)
else: