We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a4a584 commit 22b2fb8Copy full SHA for 22b2fb8
testing/test-nx-utils/src/lib/utils/tree.ts
@@ -7,7 +7,11 @@ export async function materializeTree(tree: Tree, targetFolder: string) {
7
const changes = tree.listChanges();
8
await Promise.all(
9
changes.map(async change => {
10
- const filePath = path.join(targetFolder, change.path);
+ // Handle absolute paths that start with '/' by making them relative
11
+ const relativePath = change.path.startsWith('/')
12
+ ? change.path.slice(1)
13
+ : change.path;
14
+ const filePath = path.join(targetFolder, relativePath);
15
16
if (change.type === 'CREATE' || change.type === 'UPDATE') {
17
try {
0 commit comments