fix(exit in bash): Fix handling exit everywhere #11650
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reopen #10493
The original exit (e.g. from #9002) worked correctly in sh.
However, by adding shellcheck, #9147 changed sh to bash which handles these situations differently.
Linter introduced an error that nobody noticed.
Issue discovered during investigation of #10490
|| true
withgrep
?EXIT STATUS The grep utility exits with one of the following values: 0 One or more lines were selected. 1 No lines were selected. >1 An error occurred.
grep
's man page:So if there was not admin before, the checker would stop the whole process. Now there is not difference in output (if admin exists) and if there is no admin, the initializer just continues.
|| true
withls
? Same answer.--set initializer.keepSeconds="x"
? For easier troubleshooting (to keep the job in the stack when it is finished - do not remove it).