Skip to content

Commit 32c7279

Browse files
authored
fix: policy generator fails on Windows for custom output path (#583)
1 parent af151b7 commit 32c7279

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/sdk/src/prisma.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@ export function getPrismaClientImportSpec(model: Model, importingFromDir: string
5454
// console.log('IMPORTING PATH:', importingFromDir);
5555

5656
// compute prisma client absolute output dir relative to the importing file
57-
return path.relative(importingFromDir, resolvedPrismaClientOutput);
57+
return normalizePath(path.relative(importingFromDir, resolvedPrismaClientOutput));
58+
}
59+
60+
function normalizePath(p: string) {
61+
return p ? p.split(path.sep).join(path.posix.sep) : p;
5862
}

0 commit comments

Comments
 (0)