Skip to content

Commit 22640a6

Browse files
committed
fix: use vim.fn.environ in nvim 0.5
Fixes #89
1 parent 3639e51 commit 22640a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/paq.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ local messages = {
1414

1515
-- This is done only once. Doing it for every process seems overkill
1616
local env = {}
17-
for var, val in pairs(uv.os_environ()) do
17+
local envfn = vim.fn.has('nvim-0.6') == 1 and uv.os_environ or vim.fn.environ -- compat
18+
for var, val in pairs(envfn()) do
1819
table.insert(env, ("%s=%s"):format(var, val))
1920
end
2021
table.insert(env, "GIT_TERMINAL_PROMPT=0")

0 commit comments

Comments
 (0)