Skip to content

Conversation

@st9007a
Copy link
Contributor

@st9007a st9007a commented Feb 3, 2022

If there is a posix path like /a/b//c, the regex pattern to find root directory won't match anything and cause server crashing even if the path is valid. I think windows path also has this problem.

This will happen if someone add an environment path end with a separator.

export PATH="$PATH:/path/to/lua-language-server/bin/"

This environment path will be used to extend to package.cpath. So, package.cpath here is /path/to/lua-language-server/bin//?.so which the current regex pattern can't recognize.

@sumneko
Copy link
Collaborator

sumneko commented Feb 8, 2022

Thank you!

@sumneko sumneko merged commit 9bce8c2 into LuaLS:master Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants