smartcontractkit / smartcontractkit/chainlink

Bourne shells are very whitespace sensitive. Adding or removing spaces can drastically alter the meaning of a script

Open Beginner friendly
#14,513 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.