Repository navigation
fix(run): pass the startup_command as a dict to env.execute() function. - #880
Merged
klieret merged 1 commit intoJun 29, 2026
Merged
Conversation
Member
|
oh! very good catch! Tysm! |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Member
|
Congrats to your first contrib, now part of 2.4.3 ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The get_sb_environment() function in swebench.py is used whenever an environment is needed while running benchmarks. If there exist environment startup commands, they will be passed to the env.execute() function to get executed. However, the env.execute() function expects the commands to be passed as a dict, and in current version the startup_command is passed as a string. An AttributeError will be thrown.
The Fix
startup_command is not wrapped inside a dict as {"command": startup_command} and passed to env.execute().
Test
Unit test test_get_sb_environment_runs_startup_command_as_dict() was added to test this exact fix.