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
|
---@type string
|
||||||
local config_dir
|
local config_dir
|
||||||
|
|
||||||
if vim.tbl_contains({ "linux", "darwin" }, os_name) then
|
if xdg_config and vim.fn.isdirectory(xdg_config) > 0 then
|
||||||
config_dir = (xdg_config and vim.fn.isdirectory(xdg_config) > 0) and xdg_config or vim.fn.expand("~/.config")
|
config_dir = xdg_config
|
||||||
|
elseif vim.tbl_contains({ "linux", "darwin" }, os_name) then
|
||||||
|
config_dir = vim.fn.expand("~/.config")
|
||||||
else
|
else
|
||||||
config_dir = vim.fn.expand("~/AppData/Local")
|
config_dir = vim.fn.expand("~/AppData/Local")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user