From 9d7393bbdbec133dedbc5c084a2596de227e04cf Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Mon, 4 May 2020 16:16:00 +0100 Subject: config: add note The core purpose of `Prepare_config()` is to prepare the config by setting defaults where not specified. It should not be involved itself in validation of user options. This can be an important distinction, for instance in `clean` where we use this function, but avoid validation to potentially allow for an option that deletes the config, that should work even in the face of an invalid config. Gbp-Dch: Ignore --- functions/configuration.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'functions') diff --git a/functions/configuration.sh b/functions/configuration.sh index b92b79110..6b5cfdc63 100755 --- a/functions/configuration.sh +++ b/functions/configuration.sh @@ -10,6 +10,9 @@ # Prepare config for use, filling in defaults where no value provided for instance +# +# This function should avoid performing validation checks and failing from invalid values. +# Validation should be done through `Validate_config()`. Prepare_config () { # Colouring is re-evaluated here just incase a hard coded override was given in the saved config -- cgit v1.2.3