| Age | Commit message (Collapse) | Author |
|
A scalar SYNC_DESTINATIONS containing spaces was word-split by the shared
resolve_config_array helper, breaking a single destination into multiple
broken arguments passed to rsync.
A list of rsync destinations is inherently a list, and array syntax is the
only spelling that preserves embedded spaces. resolve_sync_destinations now
detects a scalar declaration via declare -p and fails with a clear
config_error telling the user to use array syntax. The array path is
unchanged, and resolve_config_array's scalar word-splitting is left intact
for TAR_OPTS (where turning "-c -v" into separate options is desired).
Adds focused tests proving the scalar case errors without invoking rsync and
the array case preserves a space-containing destination as one argument.
Updates src/shuriken.default.conf and README.md to document the requirement.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
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>
|
|
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>
|
|
|
|
|
|
|