Skip to content

Commit 93549fe

Browse files
fix: Add error handling for Python requirements installation in scripts
1 parent 8e47674 commit 93549fe

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

infra/scripts/process_custom_data.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@ pythonScriptPath="infra/scripts/index_scripts/"
445445

446446
# Install the requirements
447447
pip install --quiet -r ${pythonScriptPath}requirements.txt
448+
if [ $? -ne 0 ]; then
449+
echo "Error: Failed to install Python requirements."
450+
exit 1
451+
fi
448452

449453
# Create Content Understanding analyzers
450454
echo "✓ Creating Content Understanding analyzer templates"

infra/scripts/run_create_index_scripts.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ fi
8787
# Install the requirements
8888
echo "Installing requirements"
8989
pip install --quiet -r ${pythonScriptPath}requirements.txt
90+
if [ $? -ne 0 ]; then
91+
echo "Error: Failed to install Python requirements."
92+
exit 1
93+
fi
9094

9195
error_flag=false
9296

0 commit comments

Comments
 (0)