Skip to content

Commit 122a064

Browse files
author
Denzel
committed
fix(presets): expand $penv for include (#371)
1 parent b3a5d4d commit 122a064

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lua/cmake-tools/presets.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ local function decode(file, visited)
6767
end
6868

6969
for _, include_path in ipairs(includes) do
70+
include_path = include_path:gsub("%$penv{(.-)}", function(envVar)
71+
return vim.env[envVar] or ""
72+
end)
73+
7074
local included_file_str
7175
local f_path = Path:new(include_path)
7276
if f_path:is_absolute() then

0 commit comments

Comments
 (0)