From 3448923b695d53a4e792bf6e7c1a538399686b92 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.com>
Date: Wed, 26 Jun 2013 13:58:00 -0400
Subject: [PATCH] collectstatic logic improvements

---
 bin/steps/collectstatic | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic
index d9c3e87a..bd357326 100644
--- a/bin/steps/collectstatic
+++ b/bin/steps/collectstatic
@@ -7,13 +7,11 @@ indent() {
 }
 
 MANAGE_FILE=$(find . -maxdepth 3 -type f -name 'manage.py' | head -1)
-MANAGE_FILE=${MANAGE_FILE:2}
+MANAGE_FILE=${MANAGE_FILE:-fakepath}
 
-if [ -f .heroku/collectstatic_disabled ]; then
-  DISABLE_COLLECTSTATIC=1
-fi
+[ -f .heroku/collectstatic_disabled ] && DISABLE_COLLECTSTATIC=1
 
-if [ ! "$DISABLE_COLLECTSTATIC" ]; then
+if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ]; then
     set +e
 
     # Check if collectstatic is configured properly.
-- 
GitLab