refactor: replace mapfile with compatible loop for reading manifest entries
This commit is contained in:
@@ -215,8 +215,11 @@ for host in "${HOSTS[@]}"; do
|
|||||||
|
|
||||||
ssh_key=$(host_to_ssh_key "$host")
|
ssh_key=$(host_to_ssh_key "$host")
|
||||||
|
|
||||||
# Read entries into array, then reverse
|
# Read entries into array, then reverse (bash 3.2 compatible — no mapfile)
|
||||||
mapfile -t entries < <(manifest_entries "$host")
|
entries=()
|
||||||
|
while IFS= read -r _entry_line; do
|
||||||
|
entries+=("$_entry_line")
|
||||||
|
done < <(manifest_entries "$host")
|
||||||
|
|
||||||
if [[ ${#entries[@]} -eq 0 ]]; then
|
if [[ ${#entries[@]} -eq 0 ]]; then
|
||||||
log_info "No entries in ${host} manifest — skipping"
|
log_info "No entries in ${host} manifest — skipping"
|
||||||
|
|||||||
Reference in New Issue
Block a user