diff --git a/scripts/buildtools/install_buildtools.sh b/scripts/buildtools/install_buildtools.sh index 362e33fad8..d6c0da388e 100755 --- a/scripts/buildtools/install_buildtools.sh +++ b/scripts/buildtools/install_buildtools.sh @@ -36,6 +36,12 @@ while getopts ":o:h" opt; do done shift $((OPTIND -1)) +if [ "$#" -ne 0 ]; then + echo "Unexpected positional arguments passed to script: $@" + exit 1 +fi + + SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" pushd . cd ${SCRIPTPATH} @@ -76,7 +82,7 @@ function install_go_module { if [[ "${BUILDTOOLS_INSTALL}" != "ALL" ]]; then install_go_module "${BUILDTOOLS_INSTALL}" - return + exit 0 fi install_go_module golang.org/x/lint golang.org/x/lint/golint diff --git a/scripts/travis/test.sh b/scripts/travis/test.sh index 9958a0db73..011a970bd7 100755 --- a/scripts/travis/test.sh +++ b/scripts/travis/test.sh @@ -15,7 +15,7 @@ chmod +x ~/gimme eval "$(~/gimme "${GOLANG_VERSION}")" # If this command fails the Makefile will select 'go test' instead. -"${SCRIPTPATH}/../buildtools/install_buildtools.sh" "gotest.tools/gotestsum" || true +"${SCRIPTPATH}/../buildtools/install_buildtools.sh" -o "gotest.tools/gotestsum" || true if [ "${OS}-${ARCH}" = "linux-arm" ] || [ "${OS}-${ARCH}" = "windows-amd64" ]; then # for arm, no tests need to be invoked.