From 5c7a5aa0c32eb19ce03e178560797db5875d7692 Mon Sep 17 00:00:00 2001 From: Wang Qin <37098874+wangqin0@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:11:42 -0800 Subject: [PATCH] ci: add error handling for Python venv creation in run.sh (#10608) --- ci/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/run.sh b/ci/run.sh index 20610e560..abf08a4ff 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -815,7 +815,10 @@ if [ -z ${GG_BUILD_LOW_PERF} ]; then ln -sfn ${mnt_models} ${SRC}/models-mnt # Create a fresh python3 venv and enter it - python3 -m venv "$MNT/venv" + if ! python3 -m venv "$MNT/venv"; then + echo "Error: Failed to create Python virtual environment at $MNT/venv." + exit 1 + fi source "$MNT/venv/bin/activate" pip install -r ${SRC}/requirements.txt --disable-pip-version-check