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

do not show errors on make install

When running "make install" in a build container,
docker is not installed the first time it's
run, causing these errors to appear;

    $ make install
    hack/make/.detect-daemon-osarch: line 11: docker: command not found
    hack/make/.detect-daemon-osarch: line 11: docker: command not found
    hack/make/.detect-daemon-osarch: line 11: docker: command not found
    hack/make/.detect-daemon-osarch: line 11: docker: command not found
    KEEPBUNDLE=1 hack/make.sh install-binary

This patch checks if docker exists, and if not
just continues silently :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2017-04-04 15:12:33 +02:00
parent ebdb7a4a1e
commit 2443decdd5
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -2,6 +2,10 @@
set -e
docker-version-osarch() {
if ! type docker &>/dev/null; then
# docker is not installed
return
fi
local target="$1" # "Client" or "Server"
local fmtStr="{{.${target}.Os}}/{{.${target}.Arch}}"
if docker version -f "$fmtStr" 2>/dev/null; then