Skip to content

Commit

Permalink
hotfix: missing environments from http-client-env-json (#144)
Browse files Browse the repository at this point in the history
Co-authored-by: houdinihacker <[email protected]>
  • Loading branch information
Kirill and houdinihacker authored Aug 15, 2024
1 parent 3822125 commit d572517
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/kulala/parser/env.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ M.get_env = function()
for key, value in pairs(vim.fn.environ()) do
env[key] = value
end

DB.data.http_client_env_base = {}
DB.data.http_client_env = {}

Expand All @@ -34,7 +34,7 @@ M.get_env = function()
f["$shared"] = nil
DB.data.http_client_env = vim.tbl_deep_extend("force", DB.data.http_client_env, f)
end
end
end
end

if code_workspace_file then
Expand Down Expand Up @@ -74,12 +74,12 @@ M.get_env = function()
end

for key, value in pairs(DB.data.http_client_env_base) do
if key ~= "DEFAULT_HEADERS" then
if key ~= "DEFAULT_HEADERS" then
env[key] = value
end
end

local selected_env_name = DB.data.http_client_env[vim.g.kulala_selected_env or Config.get().default_env]
local selected_env = DB.data.http_client_env[vim.g.kulala_selected_env or Config.get().default_env]
if selected_env then
env = vim.tbl_extend("force", env, selected_env)
end
Expand Down

0 comments on commit d572517

Please sign in to comment.