Skip to content

Commit

Permalink
Fix setup script messaging
Browse files Browse the repository at this point in the history
This was saying a database drop failed even when it didn't. This updates
some conditional logic so that it reports correctly
  • Loading branch information
yndajas committed Nov 15, 2023
1 parent 40eabb1 commit 423b330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/no-docker/setup
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 423b330

Please sign in to comment.