diff --git a/bin/omarchy-cn-mirror-apply b/bin/omarchy-cn-mirror-apply index 3ee99540..41b2dc90 100755 --- a/bin/omarchy-cn-mirror-apply +++ b/bin/omarchy-cn-mirror-apply @@ -13,7 +13,8 @@ target="${1:?usage: omarchycn mirror apply }" case "$target" in china) echo "Benchmarking China mirrors..." - mapfile -t ranked < <(cn_mirror_rank $(cn_mirror_ids_by_region cn)) + mapfile -t cn_ids < <(cn_mirror_ids_by_region cn) + mapfile -t ranked < <(cn_mirror_rank "${cn_ids[@]}") if (( ${#ranked[@]} == 0 )); then echo "No healthy China mirror reachable; keeping current mirrorlist" >&2 exit 1 diff --git a/cn/lib/mirror.sh b/cn/lib/mirror.sh index 2ce55c09..3108a2b7 100644 --- a/cn/lib/mirror.sh +++ b/cn/lib/mirror.sh @@ -1,3 +1,4 @@ +# shellcheck shell=bash # Sourced helpers for omarchy-cn-mirror-* commands CN_MIRRORS_JSON="$OMARCHY_PATH/cn/mirrors.json"