mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-29 22:29:57 +02:00
fix(dashboard): hide version when no tag found (#1572)
This commit is contained in:
parent
254ab2102b
commit
390f277b70
2 changed files with 15 additions and 6 deletions
|
@ -33,7 +33,11 @@ function _G.get_cache_dir()
|
|||
end
|
||||
|
||||
function _G.get_version(type)
|
||||
local lvim_full_ver = vim.fn.system("git -C " .. get_runtime_dir() .. "/lvim describe --tag")
|
||||
local lvim_full_ver = vim.fn.system("git -C " .. get_runtime_dir() .. "/lvim describe --tags")
|
||||
|
||||
if string.match(lvim_full_ver, "%d") == nil then
|
||||
return nil
|
||||
end
|
||||
if type == "short" then
|
||||
return vim.fn.split(lvim_full_ver, "-")[1]
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue