-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug]: ziextract fails for windows binaries #306
Comments
It looks like we assume the exe is an installer and we try to extract it. In case where the exe is actual binary, the command to extract fails. |
@anupamsr Do you happen to know if this issue just started occurring? |
No, this is the first time I have tried to use zinit on msys2 environment. I was able to fix it on my local machine with this patch: diff --git a/zinit-install.zsh b/zinit-install.zsh
index 379a2279..593469e4 100644
--- a/zinit-install.zsh
+++ b/zinit-install.zsh
@@ -1810,7 +1810,7 @@ ziextract() {
((#i)*.rpm)
→zinit-extract() { →zinit-check cpio "$file" || return 1; $ZINIT[BIN_DIR]/share/rpm2cpio.zsh "$file" | command cpio -imd --no-absolute-filenames; }
;;
- ((#i)*.exe|(#i)*.pe32)
+ ((#i)*.pe32)
→zinit-extract() {
command chmod a+x -- ./$file
./$file /S /D="`cygpath -w $PWD`" I am not sure if it will break someone else's workflow. To be honest, I think it is best not to assume that the binary we are trying to extract is an installer which will consume those arguments, but may better minds prevail... |
@anupamsr I'll open a PR this week to fix this. |
Describe the bug
zinit fails to fetch fetch binaries for windows as it fails in ziextract, such as when using the example of docker/compose from README.md
Steps to reproduce
zini for from'gh-r' as'program' stedolan/jq
ziextract: WARNING: extraction of the archive 'jq-win32.exe' had problems.
Expected behavior
It should download the binary correctly
Screenshots and recordings
Operating System & Version
msys | pc | x86_64 | x86_64 | x86_64 unknown
Zsh version
zsh 5.8 (x86_64-pc-msys)
Terminal emulator
xterm-256color (actually MINTTY shipped with msys2)
If using WSL on Windows, which version of WSL
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: