fix(login): make sure to set var on env (fixes #264) (#266)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-27 02:43:06 -04:00 committed by GitHub
parent e80246e211
commit a8022896a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,13 +151,13 @@ E.parse_envvar = function(Opts)
error("failed to run command: " .. cmd .. "\n" .. job_or_err)
return
end
vim.g.avante_pid = job_or_err.pid
else
key = os.getenv(api_key_name)
end
if key ~= nil then
E.cache[api_key_name] = key
vim.g.avante_login = true
end
return key