Skip to content

Commit 0700c1a

Browse files
committed
exit with an error when maven is not installed and using $(...) instead of legacy backticks
1 parent e22b8d2 commit 0700c1a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/update-client.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ set -o errexit
2121
set -o nounset
2222
set -o pipefail
2323

24+
readonly ERROR_MAVEN_NOT_INSTALLED=80
25+
2426
if ! which mvn > /dev/null 2>&1; then
25-
echo "Maven is not installed."
26-
exit
27+
echo "Maven is not installed." >&2
28+
exit ${ERROR_MAVEN_NOT_INSTALLED}
2729
fi
2830

2931
SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")
3032
CLIENT_ROOT="${SCRIPT_ROOT}/../kubernetes"
3133

3234
pushd "${SCRIPT_ROOT}" > /dev/null
33-
SCRIPT_ROOT=`pwd`
35+
SCRIPT_ROOT=$(pwd)
3436
popd > /dev/null
3537

3638
pushd "${CLIENT_ROOT}" > /dev/null
37-
CLIENT_ROOT=`pwd`
39+
CLIENT_ROOT=$(pwd)
3840
popd > /dev/null
3941

4042
TEMP_FOLDER=$(mktemp -d)

0 commit comments

Comments
 (0)