From f75b72ef072d361aced7aafc0a598724a406d347 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 10 Jul 2017 16:20:45 -0700 Subject: [PATCH] test-migrations: Fix error code bug. Previously, this was failing unconditionally, because of `set -e`. --- tools/test-migrations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test-migrations b/tools/test-migrations index 4ed2131bf4..7de6501f75 100755 --- a/tools/test-migrations +++ b/tools/test-migrations @@ -2,7 +2,7 @@ set -e echo 'Testing whether migrations are consistent with models' -new_auto_named_migrations=$(./manage.py showmigrations | grep -v '0004_auto_20160423_0400\|0005_auto_20160727_2333\|0052_auto_fix_realmalias_realm_nullable\|0089_auto_20170710_1353' | grep "_auto_20") +new_auto_named_migrations=$(./manage.py showmigrations | grep -v '0004_auto_20160423_0400\|0005_auto_20160727_2333\|0052_auto_fix_realmalias_realm_nullable\|0089_auto_20170710_1353' | grep "_auto_20" || true) # We check if there is any new migration with the 'auto' keyword in its name and # cause a error to rename to a more meaningful name if [ "$new_auto_named_migrations" != "" ]; then