opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

fix: format shell script and set option

Open bpgould opened this issue 2 years ago • 5 comments

Remove extra space and set pipefail option

set -o pipefail This setting prevents errors in a pipeline from being masked. If any command in a pipeline fails, that return code will be used as the return code of the whole pipeline. By default, the pipeline's return code is that of the last command even if it succeeds.

bpgould avatar Feb 06 '23 19:02 bpgould

CLA Missing ID CLA Not Signed

I signed the CLA, but I am not sure if I can re-run the CI check

bpgould avatar Feb 06 '23 22:02 bpgould

Was there something failing that led you to add this? I may be missing it but I don't see any pipes being used in this script. Does something get translated to a pipeline?

tsloughter avatar Feb 06 '23 22:02 tsloughter

Was there something failing that led you to add this? I may be missing it but I don't see any pipes being used in this script. Does something get translated to a pipeline?

I was browsing the repo and noticed the whitespace, thought I would make a quick PR. Pipefail is generally a best practice for any shell script, thus I don't think YAGNI applies.

bpgould avatar Feb 06 '23 23:02 bpgould

Unfortunately quick PRs still require the CLA. Do you want to go through that process or should we close the PR?

I do appreciate the consideration though. For future reference, here's the recommended settings for bash scripts: https://sipb.mit.edu/doc/safe-shell/

tylerbenson avatar Dec 14 '23 17:12 tylerbenson