mirror of
https://github.com/minio/minio.git
synced 2025-01-27 14:43:18 -05:00
Merge pull request #662 from vadmeste/enhance_golang_env_check
Check if go binary belongs to the go installation pointed by GOROOT env
This commit is contained in:
commit
a4fda9fa9c
@ -16,6 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
|
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
## Minimum required versions for build dependencies
|
## Minimum required versions for build dependencies
|
||||||
GCC_VERSION="4.0"
|
GCC_VERSION="4.0"
|
||||||
CLANG_VERSION="3.5"
|
CLANG_VERSION="3.5"
|
||||||
@ -92,6 +95,21 @@ check_golang_env() {
|
|||||||
echo "https://github.com/minio/minio/blob/master/INSTALLGO.md#install-go-13"
|
echo "https://github.com/minio/minio/blob/master/INSTALLGO.md#install-go-13"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local go_binary_path=$(which go)
|
||||||
|
|
||||||
|
if [ -z "${go_binary_path}" ] ; then
|
||||||
|
echo "Cannot find go binary in your PATH configuration, please refer to Go installation document"
|
||||||
|
echo "https://github.com/minio/minio/blob/master/INSTALLGO.md#install-go-13"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(dirname ${go_binary_path})" != "${GOROOT%%*(/)}/bin" ] ; then
|
||||||
|
echo "The go binary found in your PATH configuration does not belong to the Go installation pointed by your GOROOT environment," \
|
||||||
|
"please refer to Go installation document"
|
||||||
|
echo "https://github.com/minio/minio/blob/master/INSTALLGO.md#install-go-13"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
is_supported_os() {
|
is_supported_os() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user