Skip to content

Commit 2734f81

Browse files
committed
fix windows path
1 parent 7d8ab93 commit 2734f81

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lua/copilot/setup.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ local function oauth_save(oauth_token)
3535
end
3636

3737
M.get_cred = function ()
38-
local config = vim.fn.expand('$XDG_CONFIG_HOME')
39-
local userdata = vim.fn.json_decode(vim.api.nvim_eval("readfile('" .. config .. "/github-copilot/hosts.json')"))
38+
local userdata = vim.fn.json_decode(vim.api.nvim_eval("readfile('" .. find_config_path() .. "/github-copilot/hosts.json')"))
4039
local token = userdata["github.com"].oauth_token
4140
local user = oauth_user(token)
4241
return {user = user, token = token}

0 commit comments

Comments
 (0)