mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-22 13:38:26 +00:00
Merge pull request #62 from markdryan/gopath-setup
utils: Use go env to discover the GOPATH
This commit is contained in:
commit
65012d08b4
@ -19,11 +19,13 @@ set -e
|
|||||||
|
|
||||||
SCRIPT_PATH=$(dirname $(readlink -f $0))
|
SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||||
|
|
||||||
if [[ -z "$GOPATH" ]]; then
|
if [ ! $(command -v go) ]; then
|
||||||
echo "This script requires GOPATH to be set. You may need to invoke via 'sudo -E PATH=$PATH ./virtcontainers-setup.sh'"
|
echo "This script requires go to be installed and executable"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
GOPATH=$(go env "GOPATH")
|
||||||
|
|
||||||
if [ ! $(command -v docker) ]; then
|
if [ ! $(command -v docker) ]; then
|
||||||
echo "This script requires docker to be installed and executable"
|
echo "This script requires docker to be installed and executable"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user