Skip to content

Commit

Permalink
fix: an easier fix
Browse files Browse the repository at this point in the history
Civitasv committed Dec 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 645dbbf commit 6c248e1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/cmake-tools/kits.lua
Original file line number Diff line number Diff line change
@@ -23,11 +23,8 @@ function kits.parse(global_kits_path, cwd)
local config = nil

local file = findcfg() -- check for config file
if file == nil then
return config
end
file = file:gsub("~", vim.fn.expand("~"))
if file then -- if one is found ...
file = file:gsub("~", vim.fn.expand("~"))
if file:match(".*%.json") then -- .. and is a json file
config = vim.fn.json_decode(vim.fn.readfile(file))
end

0 comments on commit 6c248e1

Please sign in to comment.