Skip to content
Snippets Groups Projects
Commit ae9b83f0 authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

fix error message for collectstatic

parent d70c681c
No related branches found
No related tags found
No related merge requests found
...@@ -13,20 +13,22 @@ indent() { ...@@ -13,20 +13,22 @@ indent() {
python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true
# Don't raise errors if SILENCE_COLLECTSTATIC is set. # Don't raise errors if SILENCE_COLLECTSTATIC is set.
if [ ! "$SILENCE_COLLECTSTATIC" ]; then
set -e
fi
echo "-----> Collecting static files" echo "-----> Collecting static files"
set -e
# Compile assets if collectstatic appears to be kosher. # Compile assets if collectstatic appears to be kosher.
if [ "$RUN_COLLECTSTATIC" ]; then if [ "$RUN_COLLECTSTATIC" ]; then
python $MANAGE_FILE collectstatic --noinput | indent python $MANAGE_FILE collectstatic --noinput | indent
[ $? -ne 0 ] && { COLLECTSTATIC=$?
[ $COLLECTSTATIC -ne 0 ] && [ ! "$SILENCE_COLLECTSTATIC" ] && {
echo " ! Error running manage.py collectstatic. More info:" echo " ! Error running manage.py collectstatic. More info:"
echo " http://devcenter.heroku.com/articles/django-assets" echo " http://devcenter.heroku.com/articles/django-assets"
exit 1
} }
else else
echo " ! Django collecstatic is not configured. Learn more:" echo " ! Django collecstatic is not configured. Learn more:"
echo " http://devcenter.heroku.com/articles/django-assets" echo " http://devcenter.heroku.com/articles/django-assets"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment