Skip to content

Commit ec77356

Browse files
committed
configure: Fix logic error detecting python.
Previous version would emit an error (while continuing just fine) if the found python was not the first item in the list.
1 parent 7b03534 commit ec77356

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

configure

+9-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ inpath()
1414
}
1515

1616
if ( inpath bash ); then
17+
pp=""
1718
for p in python3 python2 python
1819
do
1920
if ( inpath $p ); then
20-
exec $p `dirname $0`/make/configure.py "$@"
21-
exit 0
22-
else
23-
echo "ERROR: no suitable version of python found."
21+
pp="$p"
22+
break
2423
fi
2524
done
25+
if [ pp != "" ]; then
26+
exec $pp `dirname $0`/make/configure.py "$@"
27+
exit 0
28+
else
29+
echo "ERROR: no suitable version of python found."
30+
fi
2631
else
2732
echo "ERROR: bash shell not found."
2833
fi

0 commit comments

Comments
 (0)