smartcontractkit / smartcontractkit/chainlink
Bourne shells are very whitespace sensitive. Adding or removing spaces can drastically alter the meaning of a script
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.2k
- Forks
- 2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 202
Description
Description
Bourne shells are very whitespace sensitive. Adding or removing spaces can drastically alter the meaning of a script. In these cases, you're missing a space at the position indicated.
Problematic code:
if [ "$STUFF" = ""]; then
Correct code:
if [ "$STUFF" = "" ]; then
Fix:
You need a space before the ] here:
https://github.com/chainlink/blob/develop/core/scripts/install-protoc.sh#L27-L27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open core/scripts/install-protoc.sh at line 27 and inspect the whitespace in the shell test against the problematic and correct examples in the issue. Done means the closing bracket is parsed separately from the empty quoted value, with the script's intended condition preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100