I am trying to run ruff check --output-format github and ruff formata --check inside Dagger.
This is supposed to fail on linting rules violation, but still output valuable data (to be picked up as GitHub PR annotations).
As far as I can tell, Dagger can either return stdout and exit with 0 or just fail without any stdout.
I found the expect option, but that's still not exactly what I need
container.with_exec(
args,
expect=ReturnType.ANY
)