From 67bc3f4815ab7597a2a6a301d70cbb73031c4f82 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Wed, 28 Feb 2024 19:24:48 +0000 Subject: [PATCH] fix(reset): correct syntax checking for valid fixtures * remove additional variable FIXTURES that isn't necessary * remove spacing in eval, causing evaluation to fail --- bin/reset_db.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/reset_db.sh b/bin/reset_db.sh index 26529338a..1b3ea0fd8 100755 --- a/bin/reset_db.sh +++ b/bin/reset_db.sh @@ -3,8 +3,6 @@ set -ex # whether to reset database file, defaults to true DB_RESET="${DJANGO_DB_RESET:-true}" -# optional fixtures to import -FIXTURES="${DJANGO_DB_FIXTURES}" if [[ $DB_RESET = true ]]; then # construct the path to the database file from environment or default @@ -25,11 +23,11 @@ else echo "DB_RESET is false, skipping" fi -valid_fixtures=$( echo $FIXTURES | grep -e fixtures\.json$ ) +valid_fixtures=$(echo "$DJANGO_DB_FIXTURES" | grep -e fixtures\.json$) if [[ -n "$valid_fixtures" ]]; then # load data fixtures - python manage.py loaddata "$FIXTURES" + python manage.py loaddata "$DJANGO_DB_FIXTURES" else echo "No JSON fixtures to load" fi