We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5017a0 commit 82e42d4Copy full SHA for 82e42d4
1 file changed
utils/build/build.sh
@@ -145,6 +145,14 @@ build() {
145
echo Build $IMAGE_NAME
146
if [[ $IMAGE_NAME == runner ]] && [[ $DOCKER_MODE != 1 ]]; then
147
if [[ -z "${IN_NIX_SHELL:-}" ]]; then
148
+ # Homebrew/Python upgrades can invalidate an existing venv.
149
+ # If the interpreter is broken, recreate the venv automatically.
150
+ if [ -d "venv/" ] && ! venv/bin/python -V >/dev/null 2>&1
151
+ then
152
+ echo "Existing venv is broken. Recreating it."
153
+ rm -rf venv
154
+ fi
155
+
156
if [ ! -d "venv/" ]
157
then
158
echo "Build virtual env"
0 commit comments