From 66ba4c28424f548b2753eb66b4a53fbed9fed7c6 Mon Sep 17 00:00:00 2001 From: Yong Date: Sat, 9 Aug 2025 22:53:15 -0500 Subject: [PATCH] Perform force repair when polaris not found --- polaris | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/polaris b/polaris index aae3e623bf..baffabbb22 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 "$@"