presubmit: shell_commands should exit if any command fails#127
presubmit: shell_commands should exit if any command fails#127ola-rozenfeld merged 2 commits intobazelbuild:masterfrom
Conversation
This may not be needed if this bazelci PR lands: bazelbuild/continuous-integration#957
ola-rozenfeld
left a comment
There was a problem hiding this comment.
So this is just so that it fails fast and doesn't run the build if format fails, etc? Because the lint check certainly works, I remember failing it a few times.
If by lint you mean "go vet", I think that can fail the build because it's the last line in the shell_commands. The problem is that bazelci joins all the shell_commands lines with a newline in between, then executes them together, and the shell only gives the exit code of the last command. This PR in the bazel-remote repository demonstrates the issue: buchgr/bazel-remote#191 Note that the first commit should obviously fail, but it didn't: buchgr/bazel-remote@1d0a0c5 |
…d#127) * presubmit: shell_commands should exit if any command fails This may not be needed if this bazelci PR lands: bazelbuild/continuous-integration#957 * presubmit: use consistent indentation
This may not be needed if/when this bazelci PR lands:
bazelbuild/continuous-integration#957