瀏覽代碼

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>
Sebastiaan van Stijn 8 年之前
父節點
當前提交
2443decdd5
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hack/make/.detect-daemon-osarch

+ 4 - 0
hack/make/.detect-daemon-osarch

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