1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix error handling when go command is missing

Signed-off-by: Mark Jeromin <mark.jeromin@sysfrog.net>
This commit is contained in:
Mark Jeromin 2018-10-31 21:43:29 -04:00
parent 35985ca087
commit 60ec93f7c2

View file

@ -6,14 +6,14 @@ set -eo pipefail
# debian latest f6fab3b798be 10 weeks ago 85.1 MB # debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB # debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
if ! command -v curl &> /dev/null; then
echo >&2 'error: "curl" not found!' # check if essential commands are in our PATH
exit 1 for cmd in curl jq go; do
fi if ! command -v $cmd &> /dev/null; then
if ! command -v jq &> /dev/null; then echo >&2 "error: \"$cmd\" not found!"
echo >&2 'error: "jq" not found!' exit 1
exit 1 fi
fi done
usage() { usage() {
echo "usage: $0 dir image[:tag][@digest] ..." echo "usage: $0 dir image[:tag][@digest] ..."