Commit 28de572
committed
fix(schematics): warn instead of crashing when the post-init firebase.json read fails
The re-read added for the firestore starter files was unguarded, so a
firebase.json that firebase-tools left unreadable would abort the whole
ng add. Before the starter files moved after the init calls, this same
failure degraded gracefully — the files were already staged, and
addFirestoreToFirebaseJson warned and let setup finish. Restore that:
warn and continue. createFirestoreStarterFiles independently checks the
disk for each file it would create, so a missing snapshot costs the
firestore-section check, not the collision safety it also relies on.
Trimmed the surrounding comments to the two constraints a future edit
could silently break — read after init, and run before
addFirestoreToFirebaseJson — and moved the rationale here.
The reason the read sits after the init calls at all: staging against a
stale pre-init snapshot risks the Tree/disk collision the .firebaserc
write hit earlier in this PR, where a Tree-staged file collides at
commit time with one firebase-tools already wrote to disk and aborts the
run. No init call adds a firestore section today, so that specific path
is defensive against a future one.1 parent e9c6ee4 commit 28de572
1 file changed
Lines changed: 13 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
0 commit comments