Problem
BashTrial.build() currently wraps the user script with boilerplate:
lines = ["#!/bin/bash", "set -e", ""]
Both are unnecessary:
#!/bin/bash — the executor calls bash {script_path} directly, so the shebang is never interpreted
set -e — silently injected behavior the user didn't ask for, can cause unexpected exits
Fix
Simplify build() to return the script as-is:
def build(self) -> str:
return self._config.script or ""
Problem
BashTrial.build()currently wraps the user script with boilerplate:Both are unnecessary:
#!/bin/bash— the executor callsbash {script_path}directly, so the shebang is never interpretedset -e— silently injected behavior the user didn't ask for, can cause unexpected exitsFix
Simplify
build()to return the script as-is: