summaryrefslogtreecommitdiff
path: root/src/lib/config.sync.source.sh
AgeCommit message (Collapse)Author
2026-06-14lm0 harden resolve_config_array callers against set -ePaul Buetow
The shared resolve_config_array helper returns non-zero when the source config var was never declared. Both callers (resolve_tar_opts, resolve_sync_destinations) invoked it unconditionally and ignored the return value, so under set -euo pipefail a genuinely-unset TAR_OPTS or SYNC_DESTINATIONS would abort the function before the empty-array fallback could run. Currently masked because apply_config_defaults always declares both vars, but the contract was unsafe to rely on. Guard both call sites with `|| true` and document why: the empty array the helper leaves behind is exactly what each caller's fallback expects. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14lm0 de-duplicate imagemagick detection and config-array parsingPaul Buetow
Introduce a shared resolve_config_array helper in bootstrap.source.sh that parses a config variable declared as either a Bash array or a whitespace-separated scalar into a named output array. resolve_tar_opts and resolve_sync_destinations now both delegate to it, with resolve_tar_opts keeping its "-c" default for the empty/unset case. validate_imagemagick now reuses resolve_imagemagick_command instead of duplicating the magick/convert probing, reporting failures through config_error so the validation output is unchanged. Add a print-config test covering the empty TAR_OPTS (scalar and array) fallback to the default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13Refactor helper modules for im0Paul Buetow
2026-06-13jm0: centralize runtime config defaultsPaul Buetow
2026-06-11Split config module concerns for task 9m0Paul Buetow