Commit a77daa3 1 parent 651338c commit a77daa3 Copy full SHA for a77daa3
File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ test-workspace/
35
35
.Spotlight-V100
36
36
.Trashes
37
37
ehthumbs.db
38
- Thumbs.db
38
+ Thumbs.db
39
+ .aider *
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { MetricParser } from "./metricParser";
18
18
@provide ( ManifestParser )
19
19
export class ManifestParser {
20
20
private lastSentParseManifestProps : any ;
21
+ private consecutiveReadFailures = 0 ;
21
22
22
23
constructor (
23
24
private nodeParser : NodeParser ,
@@ -200,13 +201,18 @@ export class ManifestParser {
200
201
201
202
try {
202
203
const manifestFile = readFileSync ( manifestLocation , "utf8" ) ;
203
- return JSON . parse ( manifestFile ) ;
204
+ const parsedManifest = JSON . parse ( manifestFile ) ;
205
+ this . consecutiveReadFailures = 0 ; // Reset counter on success
206
+ return parsedManifest ;
204
207
} catch ( error ) {
205
- this . terminal . error (
206
- "ManifestParser" ,
207
- `Could not read manifest file at ${ manifestLocation } , ignoring error` ,
208
- error ,
209
- ) ;
208
+ this . consecutiveReadFailures ++ ;
209
+ if ( this . consecutiveReadFailures > 3 ) {
210
+ this . terminal . error (
211
+ "ManifestParser" ,
212
+ `Could not read/parse manifest file at ${ manifestLocation } after ${ this . consecutiveReadFailures } attempts` ,
213
+ error ,
214
+ ) ;
215
+ }
210
216
}
211
217
}
212
218
}
You can’t perform that action at this time.
0 commit comments