fix: get abs path (#1232)
This commit is contained in:
parent
26e40e5483
commit
59fdbd72a4
@ -7,6 +7,7 @@ local M = {}
|
|||||||
---@param rel_path string
|
---@param rel_path string
|
||||||
---@return string
|
---@return string
|
||||||
local function get_abs_path(rel_path)
|
local function get_abs_path(rel_path)
|
||||||
|
if Path:new(rel_path):is_absolute() then return rel_path end
|
||||||
local project_root = Utils.get_project_root()
|
local project_root = Utils.get_project_root()
|
||||||
return Path:new(project_root):joinpath(rel_path):absolute()
|
return Path:new(project_root):joinpath(rel_path):absolute()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user