Skip to content

Commit 0186844

Browse files
authored
Fix PIO venv activate message output (#968)
* move penv activate & fix output * move penv activate back to top
1 parent 10f3f76 commit 0186844

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,14 @@ if [ $BUILD_ALL -eq 1 ] ; then
159159
exit $?
160160
fi
161161

162+
##############################################################
162163
# Set up the virtual environment if it exists
163164
if [[ -d "$PIO_VENV_ROOT" && "$VIRTUAL_ENV" != "$PIO_VENV_ROOT" ]] ; then
164165
echo "Activating virtual environment"
165166
[[ -z "$VIRTUAL_ENV" ]] && deactivate &>/dev/null
166167
source "$PIO_VENV_ROOT/bin/activate"
168+
elif [[ -d "$PIO_VENV_ROOT" && "$VIRTUAL_ENV" == "$PIO_VENV_ROOT" ]] ; then
169+
echo "Virtual environment already activated at $PIO_VENV_ROOT"
167170
else
168171
echo "Warning: Virtual environment not found in $PIO_VENV_ROOT. Continuing without it."
169172
fi

0 commit comments

Comments
 (0)