Skip to content

fix(job): remove redundant shebang and set -e from BashTrial.build() #815

@BCeZn

Description

@BCeZn

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 ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions