summaryrefslogtreecommitdiff
path: root/tests/cli.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-14 15:26:24 +0300
committerPaul Buetow <paul@buetow.org>2026-06-14 15:26:24 +0300
commit3eeef1e0f68d750e7817748180a2007095e99ef3 (patch)
tree09962cd2a9e2cbb3fc7a662504a16d560ae9b614 /tests/cli.sh
parent67231312ba2d80592e305b08bbf03f7aece2e4a3 (diff)
lm0 harden resolve_config_array callers against set -e
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>
Diffstat (limited to 'tests/cli.sh')
0 files changed, 0 insertions, 0 deletions