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) error("failed to run command: " .. cmd .. "\n" .. job_or_err)
return return
end end
vim.g.avante_pid = job_or_err.pid
else else
key = os.getenv(api_key_name) key = os.getenv(api_key_name)
end end
if key ~= nil then if key ~= nil then
E.cache[api_key_name] = key E.cache[api_key_name] = key
vim.g.avante_login = true
end end
return key return key