Makefile: fix sudo make install

When there isn't a `go` outside of the user's PATH

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-04-12 14:47:38 -04:00
parent caa1de319e
commit ac28fee304
No known key found for this signature in database
GPG Key ID: 10937E57733F1362

View File

@ -9,7 +9,11 @@ VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
PKG=github.com/containerd/containerd PKG=github.com/containerd/containerd
ifneq "$(strip $(shell command -v go 2>/dev/null))" ""
GOOS ?= $(shell go env GOOS) GOOS ?= $(shell go env GOOS)
else
GOOS ?= $$GOOS
endif
WHALE = "🐳" WHALE = "🐳"
ONI = "👹" ONI = "👹"
ifeq ("$(OS)", "Windows_NT") ifeq ("$(OS)", "Windows_NT")