diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-05-04 16:16:00 +0100 |
---|---|---|
committer | Lyndon Brown <jnqnfe@gmail.com> | 2020-05-04 16:16:00 +0100 |
commit | 9d7393bbdbec133dedbc5c084a2596de227e04cf (patch) | |
tree | 03faa430867b395b6cd04f21ed0d4561f0f10a7a | |
parent | 89ed6a54a10ba3b4ce781d8e1805f099b77cb7be (diff) | |
download | vyos-live-build-9d7393bbdbec133dedbc5c084a2596de227e04cf.tar.gz vyos-live-build-9d7393bbdbec133dedbc5c084a2596de227e04cf.zip |
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
-rwxr-xr-x | functions/configuration.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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 |