From 4f052bb3e60f20d0d676f283de2e2faece0dcef8 Mon Sep 17 00:00:00 2001 From: Thomas Skalnik Date: Tue, 13 Mar 2018 22:50:57 +0100 Subject: [PATCH] fix(schematics): win compatibility --- packages/schematics/src/command-line/shared.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/schematics/src/command-line/shared.ts b/packages/schematics/src/command-line/shared.ts index d7c1088c34a86..cc7b00d63aa98 100644 --- a/packages/schematics/src/command-line/shared.ts +++ b/packages/schematics/src/command-line/shared.ts @@ -85,7 +85,7 @@ function allFilesInDir(dirName: string): string[] { const child = path.join(dirName, c); try { if (!fs.statSync(child).isDirectory()) { - res.push(child); + res.push(normalizePath(child)); } else if (fs.statSync(child).isDirectory()) { res = [...res, ...allFilesInDir(child)]; } @@ -93,3 +93,7 @@ function allFilesInDir(dirName: string): string[] { }); return res; } + +function normalizePath(file: string): string { + return file.split(path.sep).join('/'); +}