fix: expandPlatforms need use , split

This commit is contained in:
zijiren233 2024-08-05 09:57:32 +08:00
parent e0e0af8fa2
commit 43dae84aad
1 changed files with 8 additions and 3 deletions

View File

@ -802,12 +802,12 @@ function expandPlatforms() {
elif [[ "${platform}" == *\** ]]; then
local tmp_var=""
for tmp_var in ${CURRENT_ALLOWED_PLATFORMS//,/ }; do
[[ "${tmp_var}" == ${platform} ]] && expanded_platforms="${expanded_platforms} ${tmp_var}"
[[ "${tmp_var}" == ${platform} ]] && expanded_platforms="${expanded_platforms},${tmp_var}"
done
elif [[ "${platform}" != */* ]]; then
expanded_platforms="${expanded_platforms} $(expandPlatforms "${platform}/*")"
expanded_platforms="${expanded_platforms},$(expandPlatforms "${platform}/*")"
else
expanded_platforms="${expanded_platforms} ${platform}"
expanded_platforms="${expanded_platforms},${platform}"
fi
done
removeDuplicatePlatforms "${expanded_platforms}"
@ -903,6 +903,11 @@ while [[ $# -gt 0 ]]; do
echo "${CURRENT_ALLOWED_PLATFORMS}"
exit 0
;;
--show-all-platforms=*)
initPlatforms
echo "$(expandPlatforms "${1#*=}")"
exit 0
;;
--github-proxy-mirror=*)
GH_PROXY="${1#*=}"
;;