Skip to content

Commit da0338c

Browse files
committed
minor change
1 parent 22c0977 commit da0338c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

agent/run_agent.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,17 @@ def run_agent_for_repo(
115115
message = get_message(
116116
agent_config, repo_path, test_dir=example["test"]["test_dir"]
117117
)
118+
agent_config_log_file = os.path.abspath(
119+
RUN_AIDER_LOG_DIR / "no_tests" / ".agent.yaml"
120+
)
121+
os.makedirs(os.path.dirname(agent_config_log_file), exist_ok=True)
122+
# write agent_config to .agent.yaml
123+
with open(agent_config_log_file, "w") as agent_config_file:
124+
yaml.dump(agent_config, agent_config_file)
125+
118126
for f in target_edit_files:
119127
file_name = f.replace(".py", "").replace("/", "__")
120128
log_dir = RUN_AIDER_LOG_DIR / "no_tests" / file_name
121-
# write agent_config to .agent.yaml
122-
with open(
123-
RUN_AIDER_LOG_DIR / "no_tests" / file_name / ".agent.yaml", "w"
124-
) as agent_config_file:
125-
yaml.dump(agent_config, agent_config_file)
126129
lint_cmd = get_lint_cmd(local_repo, agent_config.use_lint_info)
127130
agent.run(message, "", lint_cmd, [f], log_dir)
128131

0 commit comments

Comments
 (0)