diff options
author | chaesngmin <[email protected]> | 2021-09-17 05:14:31 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-17 05:14:31 -0700 |
commit | 390f277b702fe7877f0d5fabbece230528b58cb1 (patch) | |
tree | 6ee0fd6e116aa8f94c8ba7dffea297f12d86d5fd /lua/bootstrap.lua | |
parent | 254ab2102b5f8f6187321a545998ead4c3abd27a (diff) |
fix(dashboard): hide version when no tag found (#1572)
Diffstat (limited to 'lua/bootstrap.lua')
-rw-r--r-- | lua/bootstrap.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/bootstrap.lua b/lua/bootstrap.lua index 5e333d8a..ff6d9cdf 100644 --- a/lua/bootstrap.lua +++ b/lua/bootstrap.lua @@ -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 |