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 f6a2abb45 Perform force repair when polaris not found (#2313)
f6a2abb45 is described below

commit f6a2abb456c5f5200b523c0da0bc2f244ef43103
Author: Yong Zheng <yongzheng0...@gmail.com>
AuthorDate: Sat Aug 9 23:55:39 2025 -0500

    Perform force repair when polaris not found (#2313)
---
 polaris | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/polaris b/polaris
index aae3e623b..baffabbb2 100755
--- a/polaris
+++ b/polaris
@@ -72,5 +72,12 @@ if [ -z "$VIRTUAL_ENV" ] || [ "$(realpath "$VIRTUAL_ENV")" 
!= "$(realpath "${dir
   source "${dir}/polaris-venv/bin/activate"
 fi
 
+# If polaris is not found after activating the venv, it's likely the venv is 
old and needs a repair
+if ! command -v polaris &> /dev/null; then
+  echo "Polaris executable not found. Forcing a repair..." >&2
+  "${dir}/polaris" --repair
+  source "${dir}/polaris-venv/bin/activate"
+fi
+
 export SCRIPT_DIR="${dir}"
 exec polaris "$@"

Reply via email to