diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-10-24 09:56:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-24 09:56:32 -0700 |
| commit | fb41274c6418634f59d45efa808b6a8a2d6887f2 (patch) | |
| tree | 15f8afa712926f2d79e5df84fe0de953e689e91c /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar.gz nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar.bz2 nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar.lz nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar.xz nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.tar.zst nvim-lspconfig-fb41274c6418634f59d45efa808b6a8a2d6887f2.zip | |
fix(health): version fails for jdtls #3399
Problem:
version fails for jdtls
Solution:
Try `-version` (one hyphen). Drop `-v`, it's probably not useful. Also
drop `-h` because it is unlikely to work if `--help` didn't work.
TODO: make a smarter guess about the actual "argv0" of `cmd`.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/health.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/health.lua b/lua/lspconfig/health.lua index 74a35655..62b489c6 100644 --- a/lua/lspconfig/health.lua +++ b/lua/lspconfig/health.lua @@ -68,7 +68,7 @@ end local function try_fmt_version(prog) local all = nil --- Collected output from all attempts. local tried = '' --- Attempted commands. - for _, v_arg in ipairs { '--version', '-v', 'version', '--help', '-h' } do + for _, v_arg in ipairs { '--version', '-version', 'version', '--help' } do local cmd = { prog, v_arg } local out = try_get_cmd_output(cmd) all = out and ('%s\n%s'):format(all or '', out) or all |
