Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
john-b-yang committed Jan 22, 2025
1 parent 2f5f89b commit a0536ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swebench/harness/test_spec/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ def get_test_cmds(instance) -> list:

def get_download_img_commands(instance) -> list:
cmds = []
image_assets = json.loads(instance["image_assets"]) \
if instance.get("image_assets") else {}
image_assets = {}
if "image_assets" in instance:
if isinstance(instance["image_assets"], str):
image_assets = json.loads(instance["image_assets"])
else:
image_assets = instance["image_assets"]
for i in image_assets.get("test_patch", []):
folder = Path(i["path"]).parent
cmds.append(f"mkdir -p {folder}")
Expand Down

0 comments on commit a0536ee

Please sign in to comment.