From 8f0545c26ec06f4ad271875335aaa243adbaaf85 Mon Sep 17 00:00:00 2001
From: Daniel <daniel@harvey>
Date: Thu, 26 Mar 2020 16:46:15 +0100
Subject: [PATCH] MAINT: Earlier set -e, also documentation.

---
 utils/load_settings.sh | 5 +++++
 utils/make_db          | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/utils/load_settings.sh b/utils/load_settings.sh
index a001b98..9e8d1b7 100644
--- a/utils/load_settings.sh
+++ b/utils/load_settings.sh
@@ -18,6 +18,11 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 
+# Load setting from different files, in this order:
+# - config.defaults
+# - .config
+# - The file given in ENV_FILE.
+
 [[ -n "config.defaults" ]] && source "config.defaults"
 [[ -n ".config" ]] && source ".config"
 [[ -n "$ENV_FILE" ]] && source "$ENV_FILE"
diff --git a/utils/make_db b/utils/make_db
index 72a49da..f141fee 100755
--- a/utils/make_db
+++ b/utils/make_db
@@ -29,11 +29,11 @@ if [ -z "$UTILSPATH" ]; then
 	export UTILSPATH
 fi
 
+set -e
+
 source $UTILSPATH/load_settings.sh
 source $UTILSPATH/helpers.sh
 
-set -e
-
 function fail() {
   echo "Some error occured, exiting."
   exit 1
-- 
GitLab