fix: error on non-top-level workspace roots

This commit is contained in:
DavHau 2022-03-05 11:42:56 +07:00
parent 2a696e7198
commit 6d4b62be79
2 changed files with 7 additions and 3 deletions

View File

@ -187,7 +187,10 @@ let
translators = getTranslatorNames tree.fullPath;
subsystemInfo =
l.optionalAttrs (workspaces != []) {
workspaces = l.map (w: w.relPath) workspaces;
workspaces =
l.map
(w: l.removePrefix tree.relPath w.relPath)
workspaces;
};
};

View File

@ -132,7 +132,8 @@ let
getNodeFromPath = path:
let
pathSplit = l.splitString "/" path;
cleanPath = l.removePrefix "/" path;
pathSplit = l.splitString "/" cleanPath;
dirSplit = l.init pathSplit;
leaf = l.last pathSplit;
@ -225,7 +226,7 @@ let
prepareSourceTree =
{
source,
depth ? 5,
depth ? 10,
}:
prepareSourceTreeInternal source "" "" depth;