Skip to content

Commit bbd8d2e

Browse files
committed
ci: explicit exit when pip install whl_url failed
1 parent 60beaad commit bbd8d2e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ci_scripts/gendoc.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ export DOCROOT
1515

1616
# install paddle if not installed yet.
1717
# PADDLE_WHL is defined in ci_start.sh
18-
pip3 list --disable-pip-version-check | grep paddlepaddle > /dev/null
19-
if [ $? -ne 0 ] ; then
18+
if ! pip3 list --disable-pip-version-check | grep paddlepaddle; then
19+
echo "Paddle is not found, attempting to install from ${PADDLE_WHL}..."
2020
pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL}
21+
if [ $? -ne 0 ]; then
22+
echo -e "\e[31mError: Failed to install paddle from ${PADDLE_WHL}\e[0m"
23+
exit 1
24+
fi
25+
echo "Paddle installed successfully."
2126
fi
2227

2328

0 commit comments

Comments
 (0)