File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -160,12 +160,14 @@ puts-step "Creating Virtualenv version $(virtualenv --version)"
160160# Try to create the virtualenv.
161161OUT=$( virtualenv --python $PYTHON_EXE --distribute --never-download --prompt=' (venv) ' $VIRTUALENV_LOC 2>&1 )
162162
163- # If there's an error, purge and recreate.
164- [ $? -ne 0 ] && {
165- puts-warn " Virtualenv corrupt, rebuilding."
163+ [ $? -ne 0 -o -n " $CLEAN_VIRTUALENV " ] && {
164+ if [ -n " $CLEAN_VIRTUALENV " ]
165+ then echo " ! CLEAN_VIRTUALENV set, rebuilding virtualenv."
166+ else echo " ! Virtualenv corrupt, rebuilding."
167+ fi
166168 for dir in $VIRTUALENV_DIRS ; do
167169 rm -fr $dir & > /dev/null || true
168- done
170+ done
169171 OUT=$( virtualenv --python $PYTHON_EXE --distribute --never-download --prompt=' (venv) ' $VIRTUALENV_LOC )
170172}
171173echo " $OUT " | indent
222224# Experimental post_compile hook.
223225source $BIN_DIR /steps/hooks/post_compile
224226
225- # <a href="http://github.com/heroku/heroku-buildpack-python"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
227+ # <a href="http://github.com/heroku/heroku-buildpack-python"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
You can’t perform that action at this time.
0 commit comments