I have the following code
execCtr := ctr.
// WithExec([]string{"bash", "-c", script.String()})
WithExec([]string{"bash", "-c", "set -euo pipefail; \n" + "exit 3"})
code, _ = execCtr.ExitCode(rt.Ctx)
// Seems this is not accurate, the error holds the exit code for sonar
// This error is for failures in the dagger engine itself, not the command exit code.
// if err != nil {
// return fmt.Errorf("while getting sonar exit code: %w", err)
// }
fmt.Println("Sonar exit code:", code)
Even though this script only exit 3 the last print always has 0
What am I doing wrong here?