We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28f9661 commit 4a3e117Copy full SHA for 4a3e117
src/swerex/runtime/local.py
@@ -295,7 +295,9 @@ async def _run_normal(self, action: BashAction) -> BashObservation:
295
# (which is also somewhat brittle, so we don't do this by default).
296
try:
297
individual_commands = _split_bash_command(action.command)
298
- except bashlex.errors.ParsingError as e:
+ except Exception as e:
299
+ # Bashlex is very buggy and can throw a variety of errors, including
300
+ # ParsingErrors, NotImplementedErrors, TypeErrors, possibly more. So we catch them all
301
self.logger.error("Bashlex fail: %s", e)
302
action.command += f"\n TMPEXITCODE=$? ; sleep 0.1; echo '{self._UNIQUE_STRING}' ; (exit $TMPEXITCODE)"
303
fallback_terminator = True
0 commit comments