xx
.md

path_make_absolute

path_make_absolute converts a relative path into an absolute path resolved from the project root. It returns the path during evaluation and does not access or create the target.

Arguments

ArgumentRequiredDescription
pathYesRelative path to resolve from the project root.

Examples

Add an absolute search path

load("@os@1", "env_prepend", "os_run", "path_make_absolute")

tools = path_make_absolute("tools/bin")
os_run(("project-linter", "check"), deps=[env_prepend("PATH", tools)])

Set another path variable

load("@os@1", "env_set", "path_make_absolute")

config = env_set("TOOL_CONFIG", path_make_absolute("config/tool.json"))