CppCXY/Intellij-SumnekoLua

binary not executable

boppy opened this issue · 4 comments

boppy commented

The lua-langauge-server binary at ~/.local/share/JetBrains/PhpStorm2023.2/Sumneko-Lua/server/linux-x64/bin was not executable. I feel that this causes the negative comments on the jetbrains store, because with this file not being executable there is really not much happening.

Perhaps it's just a config issue, because I saw that the Shell Script plugin also has an executable file installed...

Currently, the plugin notes on the jetbrains store do not even mention, that the plugin is for intellij ^^

To fix that exec problem, I did a find ~/.local/share/JetBrains/ -type f -name lua-langauge-server -exec chmod u+x {} \;. As a side-effect this also makes the apple binaries executable, but that doesn't harm ;)

CppCXY commented

The execution permission problem is due to the fact that the jetbrain plugin can only be packaged as a zip, and zips don't retain execution permissions, I've used File.setExecute(true) on that but that doesn't seem to work.

Maybe I need to use:

val runtime = Runtime.getRuntime()
val process = runtime.exec(arrayOf("chmod", "+x", file.absolutePath))
process.waitFor()
boppy commented

As mentioned in #4: Give me a note if you need somebody to check it working...

CppCXY commented

https://github.com/CppCXY/Intellij-SumnekoLua/actions/runs/6943560707
after it's compiled, you can try to see if there are any permissions issues.

boppy commented

Yes! That version is working from the beginning!

Perhaps you might want to use

val process = runtime.exec(arrayOf("chmod", "u+x", file.absolutePath))

Where the u in front of the +x makes the binary only executable for the owning user. I don't see a real issue here, but it might be cleaner that way...