mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 04:26:01 +08:00
The file system engine hosts for schematics were using a helper method to read JSON files that was performing both an exist and read call. Besides causing two file system calls, this also has a potential race condition where the file may not exist by the time the read call is made. To avoid this, a try/catch is used with the read call to handle the not existing case.