FIX: Don't print error message from which when checking docker install (#549)
'which docker.io || which docker' prints an error message when docker.io is missing, which will be the case on any non-Ubuntu-based system. This is confusing and not actually an error unless _both_ are missing.
This commit is contained in:
parent
138f0dff0d
commit
994922639b
|
@ -123,15 +123,16 @@ check_IP_match() {
|
||||||
## Do we have docker?
|
## Do we have docker?
|
||||||
##
|
##
|
||||||
check_and_install_docker () {
|
check_and_install_docker () {
|
||||||
docker_path=`which docker.io || which docker`
|
if ! which docker.io docker 2>/dev/null ; then
|
||||||
if [ -z $docker_path ]; then
|
echo Failed to find docker.io or docker on your PATH.
|
||||||
read -p "Docker not installed. Enter to install from https://get.docker.com/ or Ctrl+C to exit"
|
read -p "Enter to install Docker from https://get.docker.com/ or Ctrl+C to exit"
|
||||||
curl https://get.docker.com/ | sh
|
curl https://get.docker.com/ | sh
|
||||||
fi
|
|
||||||
docker_path=`which docker.io || which docker`
|
if ! which docker.io docker 2>/dev/null ; then
|
||||||
if [ -z $docker_path ]; then
|
echo Still failed to find docker.io or docker on your PATH.
|
||||||
echo Docker install failed. Quitting.
|
echo Docker install failed. Quitting.
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue