Skip to content

Commit 5ef0bc5

Browse files
authored
Merge pull request #461 from zdharma-continuum/fix/update-linux-pattern
fix: gh-r pattern for x86_64 linux-gnu systems
2 parents 52e112c + b5a31c0 commit 5ef0bc5

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

.github/workflows/tests.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,12 @@ jobs:
3838
fetch-depth: 0
3939

4040
- name: install homebrew
41-
id: set-up-homebrew
41+
id: setup-homebrew
4242
uses: Homebrew/actions/setup-homebrew@master
4343

44-
- name: "install musl"
45-
if: runner.os == 'Linux'
46-
run: |
47-
sudo apt-get update \
48-
&& sudo apt-get install \
49-
build-essential curl file gcc gcc-multilib glibc-source \
50-
libc6 libc6-dev \
51-
musl musl-dev musl-tools unzip zsh
44+
# - name: "install musl"
45+
# if: runner.os == 'Linux'
46+
# run: sudo apt-get install build-essential curl file gcc gcc-multilib glibc-source libc6 libc6-dev unzip xz-utils zsh
5247

5348
- name: "install dependencies"
5449
id: install-deps

doc/zsdoc/zinit-install.zsh.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ ____
278278
package. Connects to Github releases page.
279279
____
280280
281-
Has 48 line(s). Calls functions:
281+
Has 52 line(s). Calls functions:
282282
283283
.zinit-get-latest-gh-r-url-part
284284
`-- zinit.zsh/+zinit-message

zinit-install.zsh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
14841484
.zi::get-architecture () {
14851485
emulate -LR zsh
14861486
setopt extendedglob noshortloops nowarncreateglobal rcquotes typesetsilent
1487-
local _arch="$(arch)" _clib="gnu" _cpu="$(uname -m)" _os="$(uname -s)" _sys=""
1487+
local _clib="gnu" _cpu="$(uname -m)" _os="$(uname -s)" _sys=""
14881488
case "$_os" in
14891489
(Darwin)
14901490
_sys='(apple|darwin|apple-darwin|dmg|mac((-|)os|)|os(-|64|)x)'
@@ -1495,9 +1495,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
14951495
;;
14961496
(Linux)
14971497
if [[ -n /lib/*musl*(#qN) ]] || (( ${+commands[musl-gcc]} )); then
1498-
_sys='((unknown-|)linux-(gnu|musl))'
1498+
_sys='(linux[\-\_])*~^*((gnu|musl)[\-\_\.])'
14991499
else
1500-
_sys="(unknown-|)linux-gnu"
1500+
_sys='(linux[\-\_])*~^*(gnu[\-\_\.])'
15011501
fi
15021502
;;
15031503
(MINGW* | MSYS* | CYGWIN* | Windows_NT)
@@ -1567,8 +1567,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
15671567
filtered=( ${list[@]:#(#i)*${~junk}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
15681568

15691569
for part in "${parts[@]}"; do
1570-
if (( $#list > 1 )) { filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ) }
1571-
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}"
1570+
if (( $#list > 1 )); then
1571+
filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
1572+
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}"
1573+
else
1574+
break
1575+
fi
15721576
done
15731577

15741578
if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); }

0 commit comments

Comments
 (0)