scripts: add -mod=vendor to go run in check-env.sh

Without -mod=vendor running go run in this script may take more
resources than needed to execute. This also makes it consistent go build
(and alike) are invoked in the other scripts and the Makefile.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-06-16 16:00:05 -04:00 committed by mergify[bot]
parent 134e11e26e
commit e111f2b613

View File

@ -41,7 +41,7 @@ if [ -n "$(command -v go)" ]; then
# in case of a failed execution, the user will be informed about # in case of a failed execution, the user will be informed about
# the missing packages based on whether they are on rpm or debian # the missing packages based on whether they are on rpm or debian
# based systems. # based systems.
if ! go run "${LIBCHECK}" > /dev/null; then if ! go run -mod=vendor "${LIBCHECK}" > /dev/null; then
if [ -n "${RPM_CMD}" ]; then if [ -n "${RPM_CMD}" ]; then
echo "Packages libcephfs-devel librbd-devel librados-devel need to be installed" echo "Packages libcephfs-devel librbd-devel librados-devel need to be installed"
elif [ -n "${DPKG_CMD}" ]; then elif [ -n "${DPKG_CMD}" ]; then