summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/archive.source.sh5
-rw-r--r--src/lib/config.sync.source.sh5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/archive.source.sh b/src/lib/archive.source.sh
index 3b173b7..b53a782 100644
--- a/src/lib/archive.source.sh
+++ b/src/lib/archive.source.sh
@@ -30,7 +30,10 @@ resolve_tar_opts() {
# Parse TAR_OPTS (array or scalar) via the shared config-array helper,
# then fall back to a plain "-c" whenever no options were configured,
# whether TAR_OPTS was unset or set to an empty value.
- resolve_config_array TAR_OPTS options_ref
+ # The helper returns non-zero when TAR_OPTS was never declared; we ignore
+ # that here (|| true) because the empty-array fallback below covers the
+ # unset case, and the bare non-zero return would otherwise trip set -e.
+ resolve_config_array TAR_OPTS options_ref || true
if (( ${#options_ref[@]} == 0 )); then
# shellcheck disable=SC2034
diff --git a/src/lib/config.sync.source.sh b/src/lib/config.sync.source.sh
index 1707fe6..3d516dc 100644
--- a/src/lib/config.sync.source.sh
+++ b/src/lib/config.sync.source.sh
@@ -6,7 +6,10 @@ resolve_sync_destinations() {
# Parse SYNC_DESTINATIONS (array or scalar) via the shared config-array
# helper. Unlike TAR_OPTS there is no default: an unset or empty value
# simply yields an empty destinations array for callers to validate.
- resolve_config_array SYNC_DESTINATIONS destinations_ref
+ # The helper returns non-zero when SYNC_DESTINATIONS was never declared;
+ # we ignore that (|| true) since the already-empty array is exactly the
+ # desired result, and the bare non-zero return would otherwise trip set -e.
+ resolve_config_array SYNC_DESTINATIONS destinations_ref || true
}
sync_dist() {