Skip to content

Commit

Permalink
Merge pull request moby#38122 from mjeromin/38070-go-command-detect
Browse files Browse the repository at this point in the history
Fix error handling when go command is missing
  • Loading branch information
thaJeztah authored Nov 5, 2018
2 parents 35985ca + 60ec93f commit b092ced
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions contrib/download-frozen-image-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ set -eo pipefail

# debian latest f6fab3b798be 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!'
exit 1
fi
if ! command -v jq &> /dev/null; then
echo >&2 'error: "jq" not found!'
exit 1
fi

# check if essential commands are in our PATH
for cmd in curl jq go; do
if ! command -v $cmd &> /dev/null; then
echo >&2 "error: \"$cmd\" not found!"
exit 1
fi
done

usage() {
echo "usage: $0 dir image[:tag][@digest] ..."
Expand Down

0 comments on commit b092ced

Please sign in to comment.