From c87373d507d4d099383a6791a70a8cd43113eeed Mon Sep 17 00:00:00 2001 From: Ynda Jas Date: Wed, 15 Nov 2023 17:47:46 +0000 Subject: [PATCH] Fix setup script messaging This was saying a database drop failed even when it didn't. This updates some conditional logic so that it reports correctly --- script/no-docker/setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/no-docker/setup b/script/no-docker/setup index 713895bf..e6a45d22 100755 --- a/script/no-docker/setup +++ b/script/no-docker/setup @@ -22,7 +22,7 @@ bundle exec rails db:drop DB_DROP_RESULT=$? set -e -if [ -z "$CI" ] && [ -n "$DB_DROP_RESULT" ]; then +if [ -z "$CI" ] && [ "$DB_DROP_RESULT" != 0 ]; then printf "\\nDatabase drop failed. Continue anyway? [y/N] " read -r @@ -44,7 +44,7 @@ RAILS_ENV="test" bundle exec rails db:drop DB_DROP_RESULT=$? set -e -if [ -z "$CI" ] && [ -n "$DB_DROP_RESULT" ]; then +if [ -z "$CI" ] && [ "$DB_DROP_RESULT" != 0 ]; then printf "\\nDatabase drop failed. Continue anyway? [y/N] " read -r