smartcontractkit / chainlink

node of the decentralized oracle network, bridging on and off-chain computation
https://chain.link
Other
6.96k stars 1.69k forks source link

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

Open philipjonsen opened 1 week ago

philipjonsen commented 1 week ago

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