Skip to content

Commit f6a2abb

Browse files
Perform force repair when polaris not found (#2313)
1 parent 360d292 commit f6a2abb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

polaris

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,12 @@ if [ -z "$VIRTUAL_ENV" ] || [ "$(realpath "$VIRTUAL_ENV")" != "$(realpath "${dir
7272
source "${dir}/polaris-venv/bin/activate"
7373
fi
7474

75+
# If polaris is not found after activating the venv, it's likely the venv is old and needs a repair
76+
if ! command -v polaris &> /dev/null; then
77+
echo "Polaris executable not found. Forcing a repair..." >&2
78+
"${dir}/polaris" --repair
79+
source "${dir}/polaris-venv/bin/activate"
80+
fi
81+
7582
export SCRIPT_DIR="${dir}"
7683
exec polaris "$@"

0 commit comments

Comments
 (0)