openzipkin-attic / docker-zipkin

Docker images for OpenZipkin
Apache License 2.0
688 stars 329 forks source link

When testing variables in shell they should be double quoted #132

Closed someword closed 7 years ago

someword commented 7 years ago

The docker container ships with various profiles that are shell scripts. In the shell scripts tests are being done on optional variables which is throwing errors because the optional variables are not double quoted.

Shell best practice is to double quote variables when comparing, testing, etc.

someword commented 7 years ago

Before the patch I get the following because we are testing a nil/null/nothing

docker run -it -p 9411:9411 -e STORAGE_TYPE=elasticsearch -e ES_AWS_DOMAIN=your_domain -v $HOME/.aws:/root/.aws:ro openzipkin/zipkin sh: -z: unknown operand Elasticsearch domain: your_domain

After the patch no errors

docker run -it -p 9411:9411 -e STORAGE_TYPE=elasticsearch -e ES_AWS_DOMAIN=your_domain -v $HOME/.aws:/root/.aws:ro openzipkin/zipkin Elasticsearch domain: your_domain

codefromthecrypt commented 7 years ago

thanks for the note. care to raise your commit as a PR?

someword commented 7 years ago

doh! Fixed my PR to go against correct repo:)