From 0fb913b299d22375cf6cfb930825231420c4d5f2 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Tue, 26 Nov 2024 19:18:15 -0800 Subject: [PATCH] fix(health): nil check (closes #1539) --- lua/fzf-lua/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/utils.lua b/lua/fzf-lua/utils.lua index 56f5cccb..505ba43c 100644 --- a/lua/fzf-lua/utils.lua +++ b/lua/fzf-lua/utils.lua @@ -1189,7 +1189,7 @@ function M.fzf_version(opts) -- if it contains options aren't compatible with fzf's version local FZF_DEFAULT_OPTS = vim.env.FZF_DEFAULT_OPTS vim.env.FZF_DEFAULT_OPTS = nil - local out, rc = M.io_system({ opts.fzf_bin or "fzf", "--version" }) + local out, rc = M.io_system({ opts and opts.fzf_bin or "fzf", "--version" }) vim.env.FZF_DEFAULT_OPTS = FZF_DEFAULT_OPTS return version_str_to_num(out), rc, out end @@ -1199,7 +1199,7 @@ function M.sk_version(opts) -- if it contains options aren't compatible with sk's version local SKIM_DEFAULT_OPTIONS = vim.env.SKIM_DEFAULT_OPTIONS vim.env.SKIM_DEFAULT_OPTIONS = nil - local out, rc = M.io_system({ opts.fzf_bin or "sk", "--version" }) + local out, rc = M.io_system({ opts and opts.fzf_bin or "sk", "--version" }) vim.env.SKIM_DEFAULT_OPTIONS = SKIM_DEFAULT_OPTIONS return version_str_to_num(out), rc, out end