mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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`.
This commit is contained in:
committed by
mmalerba
parent
08509816b2
commit
509e3e90f5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user