-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Fix lua-language-server --check (#2683) #2775
Conversation
https://github.com/LuaLS/lua-language-server/pull/2775/files#r1696338679
Hi, I just reproduced this using archlinux (docker) as stated in your environment
Now it is clear that the
#!/bin/bash
exec "<path-to-directory>/bin/lua-language-server" "$@" You can verify this by just executing the full binary path:
No |
Oh I just found that lua-language-server/make/bootstrap.lua Lines 1 to 10 in 2a48dee
Now I agree that we just can't assume I assume that the executable path will always be the most negative index that give a non nil value in -- exe name will be at the most negative index argument
local exe
local minIndex = -1
while arg[minIndex] do
exe = arg[minIndex]
minIndex = minIndex - 1
end This can handle some extreme cases where in someday, someone modifies the launch script to eg. |
fwiw I was consistently running into this bug on NixOS and this PR fixes it for me. |
If you are ready, please update the changelog. I don't have time to test on other platforms. |
I don't have time to test, but I believe that this pull request has been completed. |
importantly, includes <LuaLS/lua-language-server#2775> to fix `lua-language-server --check`.
Fix #2683