You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A downloaded archive whose root entry is ./ gives its language server a command with /./ #2139
A downloaded archive whose root entry is ./ gives ${output.dir}, and so the command of its language server, a /./. The bundled cpp_ls installer, with cpp_ls-darwin-x64.tar.gz and its other assets, sets the command
"$USER_HOME$/.lsp4ij/lsp/cpp_ls/./cpp_ls"
and its installer console shows ${output.dir}=$USER_HOME$/.lsp4ij/lsp/cpp_ls/.. The server starts, so this is cosmetic, but the command shows in the settings and the LSP console, and a command compared as written, as replaceTemplateCommand compares the template's command, would not match the same path without the ./.
Cause
When an extracted archive is a single directory and stripRootFolder isn't set, DownloadTask appends that directory's name to the output dir:
vardecompressFolderName = decompressedDir.getName(decompressedDir.getNameCount() - 1);
dir = dir + "/" + decompressFolderName;
outputDir = outputDir.resolve(decompressFolderName);
For an archive whose root entry is ./, decompressedDir is <output dir>/., so the name is ..
Expected
A root entry of . adds nothing to ${output.dir}: $USER_HOME$/.lsp4ij/lsp/cpp_ls/cpp_ls. For instance, skip a root folder named ., or normalize decompressedDir before taking its name.
Found by a live run of the bundled installers for 0.30.2, on macOS (arm64 and x86_64).
Activity
fix: a downloaded archive whose root entry is ./ gives its language s…