mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
fix error message for collectstatic
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user