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

AppleSilicon does not pass is_arm check due to error in server.vim #330

Open
formtief opened this issue Mar 8, 2024 · 1 comment
Open

Comments

@formtief
Copy link

formtief commented Mar 8, 2024

On Apple Silicon uname -m returns arm64 , therefore stridx(arch, 'arm') == 0 returns false. Change this to <= 2 and it should be fine (I think)
`
let is_arm = stridx(arch, 'arm') == 0 || stridx(arch, 'aarch64') == 0

if os ==# 'Linux' && is_arm
let bin_suffix = 'linux_arm'
elseif os ==# 'Linux'
let bin_suffix = 'linux_x64'
elseif os ==# 'Darwin' && is_arm
let bin_suffix = 'macos_arm'
elseif os ==# 'Darwin'
let bin_suffix = 'macos_x64'
else
let bin_suffix = 'windows_x64.exe'
endif
`

@pqn
Copy link
Contributor

pqn commented Mar 8, 2024

Doesn't stridx look up the index where the substring match begins? https://vimhelp.org/builtin.txt.html#stridx%28%29

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