You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/04/02 21:58:41 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #4593: Fail install_goose.sh if installing goose fails

zrhoffman commented on a change in pull request #4593: Fail install_goose.sh if installing goose fails
URL: https://github.com/apache/trafficcontrol/pull/4593#discussion_r402620084
 
 

 ##########
 File path: traffic_ops/install/bin/install_goose.sh
 ##########
 @@ -14,11 +14,13 @@
 # limitations under the License.
 #
 
-echo "Now installing goose"
-export GOPATH=/opt/traffic_ops/go
-mkdir -p $GOPATH
+trap "echo Error on line ${LINENO} of '$0'; exit 1" ERR;
+set -o errexit -o nounset;
+echo "Now installing goose";
+export GOPATH=/opt/traffic_ops/go;
+mkdir -p $GOPATH;
 
-go get bitbucket.org/liamstask/goose/cmd/goose
-go get github.com/lib/pq
+go get bitbucket.org/liamstask/goose/cmd/goose;
+go get github.com/lib/pq;
 
-echo "Successfully installed goose to $GOPATH/bin/goose"
+echo "Successfully installed goose to $GOPATH/bin/goose";
 
 Review comment:
   Why generally? I personally find semicolons nice if I am copying and pasting an entire script into a terminal, because if the TTY misses a newline, it still works. Since that is not related to this PR though, I can remove them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services