Skip to content

Commit

Permalink
fix(health): nil check (closes #1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Nov 27, 2024
1 parent e2f7165 commit 0fb913b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/fzf-lua/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0fb913b

Please sign in to comment.