windows: 修复 image-name 有特殊符号时出错

fixes #575
This commit is contained in:
bin456789
2026-03-15 17:19:22 +08:00
parent f0b3a475fc
commit 41c4df9fdb

View File

@ -5852,7 +5852,7 @@ install_windows() {
while true; do
# 匹配成功
# 改成正确的大小写
if matched_image_name=$(echo "$all_image_names" | grep -ix "$image_name"); then
if matched_image_name=$(printf '%s\n' "$all_image_names" | grep -Fix "$image_name"); then
image_name=$matched_image_name
image_index=$(wiminfo "$iso_install_wim" "$image_name" | grep 'Index:' | awk '{print $NF}')
break