From e2c2f825f0b1a95e98b39b557f87048e515c07b1 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 22 Aug 2022 18:05:55 +0200 Subject: [PATCH] nvim: check if fc-list exists before trying to run it --- .config/nvim/lua/my/functions.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/my/functions.lua b/.config/nvim/lua/my/functions.lua index be35e62..5bdd88a 100644 --- a/.config/nvim/lua/my/functions.lua +++ b/.config/nvim/lua/my/functions.lua @@ -109,7 +109,8 @@ end -- return true if 'Symbols Nerd Font' is known to fontconfig 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 end return false