Skip to content
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

self-update failed #47

Closed
uga-rosa opened this issue May 9, 2022 · 2 comments
Closed

self-update failed #47

uga-rosa opened this issue May 9, 2022 · 2 comments

Comments

@uga-rosa
Copy link
Contributor

uga-rosa commented May 9, 2022

WHAT

After I run afx self-update, an error zsh: exec format error: afx arised. The version before the update was 1.21.
I manually reinserted afx and it fixed, so it seems that the detection of OS or architecture is failing during self-update.
I use Ubuntu20.04 on WSL2 and afx_linux_x86_64.tar.gz.

@babarot
Copy link
Owner

babarot commented May 28, 2022

I don't have above environment so I can't reproduce your situation. Maybe related code is here: https://github.com/b4b4r07/afx/blob/master/pkg/github/github.go#L162-L223

Please contribute it

@uga-rosa
Copy link
Contributor Author

uga-rosa commented May 30, 2022

https://github.com/b4b4r07/afx/blob/ee7148103bd3c744a20743e00f7c60e90793cb03/pkg/github/github.go#L207

2022/05/30 10:25:02 [DEBUG] assets.filter: filtered: []string{"afx_linux_arm64.tar.gz", "afx_linux_i386.tar.gz", "afx_linux_x86_64.tar.gz"}
2022/05/30 10:25:02 [DEBUG] assets.filter: filtered: []string{"afx_linux_arm64.tar.gz", "afx_linux_x86_64.tar.gz"}
2022/05/30 10:25:02 [WARN] 2 assets found: []string{"afx_linux_arm64.tar.gz", "afx_linux_x86_64.tar.gz"}
2022/05/30 10:25:02 [WARN] first one "afx_linux_arm64.tar.gz" will be used

It seems that arm64 matches this regex (since it contains 64). I think changing 64 to x86_64 will solve the problem, but will there be any side effects?

uga-rosa added a commit to uga-rosa/afx that referenced this issue Jun 5, 2022
babarot pushed a commit that referenced this issue Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants