فهرست منبع

Add workaround for Bash 4.3 being silly

Tianon Gravi 7 سال پیش
والد
کامیت
f488c55aaf
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      naughty-from.sh

+ 2 - 1
naughty-from.sh

@@ -64,7 +64,8 @@ for img in $tags; do
 	done
 done
 
-for naughtyFrom in "${naughtyFroms[@]}"; do
+for naughtyFrom in "${naughtyFroms[@]:-}"; do
+	[ -n "$naughtyFrom" ] || continue # https://mywiki.wooledge.org/BashFAQ/112#BashFAQ.2F112.line-8 (empty array + "set -u" + bash 4.3 == sad day)
 	img="${naughtyFrom%%=*}"
 	from="${naughtyFrom#$img=}"
 	arches="${naughtyFromsArches[$naughtyFrom]}"