From 509e3e90f5ad985099342d587f6c703ef4406cea Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 7 Aug 2017 19:18:48 +0200 Subject: [PATCH] build: fix error when running devapp on windows (#6288) Currently developers using Windows are not able to serve the devapp because the secondary entry-points can't be resolved. This can happen because of two things: * `egrep`, which is an alias for `grep -E` is not part of the global `$PATH` variable on Windows * The Regular Expression for the `grep` call is ambiguous and expects zero-width characters to be present. This commit changes the `spawnSync` call to use `grep -E` and also changes the Regular Expression to be more explicit about what characters to match after the `from`. --- tools/package-tools/secondary-entry-points.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/package-tools/secondary-entry-points.ts b/tools/package-tools/secondary-entry-points.ts index 9d742a5538a6..46207b924ba7 100644 --- a/tools/package-tools/secondary-entry-points.ts +++ b/tools/package-tools/secondary-entry-points.ts @@ -38,10 +38,10 @@ export function getSecondaryEntryPointsForPackage(pkg: BuildPackage) { buildNodes.forEach(node => { // Look for any imports that reference this same umbrella package and get the corresponding // BuildNode for each by looking at the import statements with grep. - node.deps = spawnSync('egrep', [ - '-roh', + node.deps = spawnSync('grep', [ + '-Eroh', '--include', '*.ts', - `from.'@angular/${packageName}/.+';`, + `from '@angular/${packageName}/.+';`, `${packageDir}/${node.name}/` ]) .stdout