Skip to content

Commit e97a2e6

Browse files
Rahul Singhalpwendell
authored andcommitted
SPARK-1658: Correctly identify if maven is installed and working
The current test is checking the exit code of "tail" rather than "mvn". This new check will make sure that mvn is installed and was able to execute the "version command". Author: Rahul Singhal <[email protected]> Closes #580 from rahulsinghaliitd/SPARK-1658 and squashes the following commits: 83c0313 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working bf821b9 [Rahul Singhal] SPARK-1658: Correctly identify if maven is installed and working
1 parent fb05432 commit e97a2e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

make-distribution.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
FWDIR="$(cd `dirname $0`; pwd)"
4444
DISTDIR="$FWDIR/dist"
4545

46-
VERSION=$(mvn help:evaluate -Dexpression=project.version | grep -v "INFO" | tail -n 1)
47-
if [ $? == -1 ] ;then
46+
set -o pipefail
47+
VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1)
48+
if [ $? != 0 ]; then
4849
echo -e "You need Maven installed to build Spark."
4950
echo -e "Download Maven from https://maven.apache.org."
5051
exit -1;

0 commit comments

Comments
 (0)