This is an automated email from the ASF dual-hosted git repository.

yzheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 35b31ca2e Clean exit when running repair mode for client (#2287)
35b31ca2e is described below

commit 35b31ca2e769559590a8fb64551d5ac199f7c55f
Author: Yong Zheng <yongzheng0...@gmail.com>
AuthorDate: Wed Aug 6 21:30:32 2025 -0500

    Clean exit when running repair mode for client (#2287)
    
    * Clean exit when running repair mode for client
    
    * Clean exit when running repair mode for client
---
 polaris | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/polaris b/polaris
index 1b072a6c2..aae3e623b 100755
--- a/polaris
+++ b/polaris
@@ -39,14 +39,15 @@ if [ ! -d "${dir}"/polaris-venv ] || [ "$repair" == true ]; 
then
   rm -f "${dir}"/poetry.lock
   rm -f "${dir}/client/python/poetry.lock"
 
+  is_first_time=false
   if [ ! -d "${dir}/polaris-venv" ]; then
+    is_first_time=true
     echo "Performing first-time setup for the Python client..."
     python3 -m venv "${dir}"/polaris-venv
   else
     echo "Repair dependencies for the Python client..."
   fi
 
-  rm -f "${dir}"/poetry.lock
   . "${dir}"/polaris-venv/bin/activate
   pip install --upgrade pip
   pip install --upgrade -r regtests/requirements.txt
@@ -55,11 +56,15 @@ if [ ! -d "${dir}"/polaris-venv ] || [ "$repair" == true ]; 
then
 
   deactivate
 
-  if [ ! -d ${dir}/polaris-venv ]; then
+  if [ "$is_first_time" == true ]; then
     echo "First time setup complete."
   else
     echo "Dependencies repaired."
   fi
+
+  if [ "$repair" == true ]; then
+    exit 0
+  fi
 fi
 
 # Check if the correct virtual environment is already active, if not, activate 
it.

Reply via email to