Uh oh!
There was an error while loading. Please reload this page.
Fix: Pass -e to sh and bash during command execution - #3065
Conversation
| # In order to prevent that difference, hello.txt does not have a trailing newline. | ||
| acceptance/selftest/record_cloud/volume-io/hello.txt | ||
| # error output when artifact build fails contains trailing whitespace: |
There was a problem hiding this comment.
would adding the newline at the end of these files work? that's probably easier than maintaining a list of output files that end with Exit code: 1 (there are already a few of them in the codebase)
There was a problem hiding this comment.
In this case, the problem is the trailing space after output:, so it's specific to this test only.
Error: build failed my_artifact, error: exit status 1, output:
pietern
left a comment
There was a problem hiding this comment.
Thanks for fixing.
FWIW, I believe that unit test coverage is more appropriate than acceptance tests here. It's good to have coverage for the case "artifact build fails; observe error" with a simple "exit 1", but not specifically how the error happens. Otherwise, we'd have to confirm this for every call site of libs/exec.
## Changes This PR fixes a regression introduced in #2896 where we stopped passing the `-e` flag to the shell, which makes both sh and bash bail out at the first command with a non-zero exit code. ## Why Adding back `-e` keeps the behaviour consistent with the one before #2896 was introduced. ## Tests Newly added regression tests
Changes
This PR fixes a regression introduced in #2896 where we stopped passing the
-eflag to the shell, which makes both sh and bash bail out at the first command with a non-zero exit code.Why
Adding back
-ekeeps the behaviour consistent with the one before #2896 was introduced.Tests
Newly added regression tests