SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix (tools): Await 'which' commands
Kilian Lieret1573419181eb
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.pyindex f48c8878..d32c9d7e 100644--- a/sweagent/tools/tools.py+++ b/sweagent/tools/tools.py@@ -204,7 +204,9 @@ class ToolHandler:async def _is_command_available(self, env, command: str, env_vars: dict[str, str]) -> None:try:- env.deployment.runtime.execute(RexCommand(command=f"which {command}", shell=True, check=True, env=env_vars))+ await env.deployment.runtime.execute(+ RexCommand(command=f"which {command}", shell=True, check=True, env=env_vars)+ )except Exception:msg = f"Tool {command} is not available in the container."raise RuntimeError(msg) from None