chore(copilot): check for valid file in addition to plugin setup (#120)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-20 19:00:41 -04:00
committed by GitHub
parent fe30ef6782
commit 76dd441e25
2 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ M.machine_id = function()
end
---@return string | nil
local function find_config_path()
M.find_config_path = function()
local config = vim.fn.expand("$XDG_CONFIG_HOME")
if config and vim.fn.isdirectory(config) > 0 then
return config
@@ -58,7 +58,7 @@ M.cached_token = function()
end
-- loading token from the file
local config_path = find_config_path()
local config_path = M.find_config_path()
if not config_path then
return nil
end