fix(copilot): Prioritize xdg_config
for OAuth token references on Windows (#1037)
This commit is contained in:
parent
48fc35f978
commit
0536c6e552
@ -104,8 +104,10 @@ H.get_oauth_token = function()
|
||||
---@type string
|
||||
local config_dir
|
||||
|
||||
if vim.tbl_contains({ "linux", "darwin" }, os_name) then
|
||||
config_dir = (xdg_config and vim.fn.isdirectory(xdg_config) > 0) and xdg_config or vim.fn.expand("~/.config")
|
||||
if xdg_config and vim.fn.isdirectory(xdg_config) > 0 then
|
||||
config_dir = xdg_config
|
||||
elseif vim.tbl_contains({ "linux", "darwin" }, os_name) then
|
||||
config_dir = vim.fn.expand("~/.config")
|
||||
else
|
||||
config_dir = vim.fn.expand("~/AppData/Local")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user