nvim: check if fc-list exists before trying to run it

This commit is contained in:
tastytea 2022-08-22 18:05:55 +02:00
parent 335e02f4f8
commit e2c2f825f0
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -109,7 +109,8 @@ end
-- return true if 'Symbols Nerd Font' is known to fontconfig -- return true if 'Symbols Nerd Font' is known to fontconfig
function M.nerdfont_installed() function M.nerdfont_installed()
if os.execute([[fc-list -q 'Symbols Nerd Font']]) == 0 then if vim.fn.executable('fc-list') == 1 and
os.execute([[fc-list -q 'Symbols Nerd Font']]) == 0 then
return true return true
end end
return false return false