Skip to content

Commit

Permalink
fix(schematics): win compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
skydever authored and vsavkin committed Mar 14, 2018
1 parent cc49f36 commit 4f052bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/schematics/src/command-line/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ 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)];
}
} catch (e) {}
});
return res;
}

function normalizePath(file: string): string {
return file.split(path.sep).join('/');
}

0 comments on commit 4f052bb

Please sign in to comment.