fix: copilot config path (#392)

This commit is contained in:
yetone 2024-08-30 15:13:52 +08:00 committed by GitHub
parent 8c71e1f624
commit ec4d2eee0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ H.get_oauth_token = function()
local config_dir
if vim.tbl_contains({ "linux", "darwin" }, os_name) then
config_dir = vim.fn.isdirectory(xdg_config) and xdg_config or vim.fn.expand("~/.config")
config_dir = (xdg_config and vim.fn.isdirectory(xdg_config) > 0) and xdg_config or vim.fn.expand("~/.config")
else
config_dir = vim.fn.expand("~/AppData/Local")
end