This commit is contained in:
vladislav doster 2026-09-03 10:47:02 +00:00 committed by GitHub
commit 9b9a374997
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 2 deletions

View file

@ -67,6 +67,18 @@
local bazel="$ZBIN/bazel"; assert "$bazel" is_executable
run "$bazel" --version; assert $state equals 0
}
@test 'bicep' { # Domain-specific language (DSL) for deploying Azure resources declaratively
run zinit lbin'!bicep* -> bicep' for @Azure/bicep; assert $state equals 0
local bicep="$ZBIN/bicep"; assert "$bicep" is_executable
run "$bicep" --version; assert $state equals 0
# regression: the asset must match the host libc — musl only on musl systems
run ls "${ZINIT[PLUGINS_DIR]}/Azure---bicep"
if [[ $OSTYPE == *musl* || "$(command ldd --version 2>&1)" == *musl* ]]; then
assert "$output" matches 'musl'
else
assert "$output" does_not_match 'musl'
fi
}
@test 'blast' { # Blast is a simple tool for API load testing and batch jobs
[[ $OSTYPE =~ 'darwin*' ]] && skip "on $os_type"
run zinit for @dave/blast; assert $state equals 0

View file

@ -1418,7 +1418,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
fi
;;
(Linux)
_sys='(musl|gnu)*~^*(unknown|)linux*'
_sys='linux'
[[ $OSTYPE == *musl* || "$(command ldd --version 2>&1)" == *musl* ]] && _clib="musl"
;;
(MINGW* | MSYS* | CYGWIN* | Windows_NT)
_sys='pc-windows-gnu'
@ -1444,7 +1445,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
+zi-log "{e} {b}gh-r{rst}Unsupported CPU: {obj}$_cpu{rst}"
;;
esac
echo "${_sys};${_cpu};${_os}"
echo "${_sys};${_cpu};${_os};${_clib}"
} # ]]]
# FUNCTION: .zinit-get-latest-gh-r-url-part [[[
# Gets version string of latest release of given Github
@ -1512,6 +1513,17 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
fi
done
# A musl asset is correct only when the host libc is musl — but runs after
# the CPU filter so a musl-only arch (e.g. only x86_64 build is musl) still resolves.
if (( $#list > 1 )); then
if [[ $parts[4] == musl ]]; then
filtered=( ${(M)list[@]:#(#i)*musl*} )
else
filtered=( ${list[@]:#(#i)*musl*} )
fi
(( $#filtered > 0 )) && list=( ${filtered[@]} )
fi
if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); }
if (( !$#list )); then