From b059605b37ed4027980e4b27f4585c85b53b46ab Mon Sep 17 00:00:00 2001 From: raydds Date: Thu, 16 Jan 2020 11:52:18 -0500 Subject: [PATCH] Dropdb has a handy argument for conditionally dropping a database --- script/include/helper_functions.inc.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/script/include/helper_functions.inc.sh b/script/include/helper_functions.inc.sh index 0df1323a..9f5de990 100644 --- a/script/include/helper_functions.inc.sh +++ b/script/include/helper_functions.inc.sh @@ -40,9 +40,7 @@ reset_db() { local database_name="${1}" # If the DB exists, drop it - set +e - dropdb "${database_name}" - set -e + dropdb --if-exists "${database_name}" # Create a fresh DB createdb "${database_name}"