fix: filter by runtime detected CPU before compiled CPU (#304)

Closes  #287

Signed-off-by: Christian Höltje <docwhat@gerf.org>
This commit is contained in:
Christian Höltje 2022-07-05 19:54:00 -04:00 committed by GitHub
parent f5b59449ff
commit a4dc13f66a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1545,8 +1545,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
}
if (( $#list > 1 )) {
filtered=( ${(M)list[@]:#(#i)*${~matchstr[${MACHTYPE}]}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{pre}gh-r{rst}:{info} ${matchstr[${MACHTYPE}]}\\n{obj}${(pj:\n:)${(@)list[1,5]:t}}{rst}"
filtered=( ${(M)list[@]:#(#i)*${~matchstr[${CPUTYPE}]}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{pre}gh-r{rst}:{info} ${matchstr[${CPUTYPE}]}\\n{obj}${(pj:\n:)${(@)list[1,5]:t}}{rst}"
}
if (( $#list > 1 )) {
@ -1555,8 +1555,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
}
if (( $#list > 1 )) {
filtered=( ${(M)list[@]:#(#i)*${~matchstr[${CPUTYPE}]}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{pre}gh-r{rst}:{info} ${matchstr[${CPUTYPE}]}\\n{obj}${(pj:\n:)${(@)list[1,5]:t}}{rst}"
filtered=( ${(M)list[@]:#(#i)*${~matchstr[${MACHTYPE}]}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{pre}gh-r{rst}:{info} ${matchstr[${MACHTYPE}]}\\n{obj}${(pj:\n:)${(@)list[1,5]:t}}{rst}"
}
if (( $#list > 1 )) {