lib/sources: remove absolute path literals (#514226)

This commit is contained in:
John Ericson
2026-04-28 14:22:35 +00:00
committed by GitHub
+7 -1
View File
@@ -311,7 +311,13 @@ let
fileName = path + "/${file}";
packedRefsName = path + "/packed-refs";
absolutePath =
base: path: if lib.hasPrefix "/" path then path else toString (/. + "${base}/${path}");
base: path:
if lib.hasPrefix "/" path then
path
else if lib.hasPrefix "/" base then
"${base}/${path}"
else
"/${base}/${path}";
in
if
pathIsRegularFile path