From 390f277b702fe7877f0d5fabbece230528b58cb1 Mon Sep 17 00:00:00 2001 From: chaesngmin Date: Fri, 17 Sep 2021 05:14:31 -0700 Subject: fix(dashboard): hide version when no tag found (#1572) --- lua/bootstrap.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua/bootstrap.lua') 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 -- cgit v1.2.3