From ae9b83f07ca62548457d27fbfae86f5277ec0312 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.com> Date: Wed, 30 May 2012 13:55:22 -0400 Subject: [PATCH] fix error message for collectstatic --- bin/steps/django/collectstatic | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/steps/django/collectstatic b/bin/steps/django/collectstatic index fcbf685b..f0921952 100755 --- a/bin/steps/django/collectstatic +++ b/bin/steps/django/collectstatic @@ -13,20 +13,22 @@ indent() { python $MANAGE_FILE collectstatic --help &> /dev/null && RUN_COLLECTSTATIC=true # Don't raise errors if SILENCE_COLLECTSTATIC is set. -if [ ! "$SILENCE_COLLECTSTATIC" ]; then - set -e -fi echo "-----> Collecting static files" +set -e # Compile assets if collectstatic appears to be kosher. if [ "$RUN_COLLECTSTATIC" ]; then python $MANAGE_FILE collectstatic --noinput | indent - [ $? -ne 0 ] && { + COLLECTSTATIC=$? + + [ $COLLECTSTATIC -ne 0 ] && [ ! "$SILENCE_COLLECTSTATIC" ] && { echo " ! Error running manage.py collectstatic. More info:" echo " http://devcenter.heroku.com/articles/django-assets" + exit 1 } + else echo " ! Django collecstatic is not configured. Learn more:" echo " http://devcenter.heroku.com/articles/django-assets" -- GitLab