@@ -119,7 +119,7 @@ func executeDownloadCommand(cmd *cobra.Command, args []string) error {
119
119
}
120
120
}
121
121
122
- status , err := libraries .CreateStatusContextFromIndex (index , nil , nil )
122
+ status , err := libraries .CreateStatusContextFromIndex (index )
123
123
if err != nil {
124
124
status , err = prettyPrintCorruptedIndexFix (index )
125
125
if err != nil {
@@ -173,7 +173,7 @@ func executeInstallCommand(cmd *cobra.Command, args []string) error {
173
173
}
174
174
}
175
175
176
- status , err := libraries .CreateStatusContextFromIndex (index , nil , nil )
176
+ status , err := libraries .CreateStatusContextFromIndex (index )
177
177
if err != nil {
178
178
status , err = prettyPrintCorruptedIndexFix (index )
179
179
if err != nil {
@@ -332,29 +332,12 @@ func executeSearch(cmd *cobra.Command, args []string) error {
332
332
return nil
333
333
}
334
334
335
- status , err := libraries .CreateStatusContextFromIndex (index , nil , nil )
335
+ status , err := libraries .CreateStatusContextFromIndex (index )
336
336
if err != nil {
337
- if GlobalFlags .Verbose > 0 {
338
- fmt .Println ("Cannot parse index file, it may be corrupted. downloading from downloads.arduino.cc" )
339
- }
340
-
341
- err = prettyPrintDownloadFileIndex ()
342
- if err != nil {
343
- return nil
344
- }
345
-
346
- //after download, I retry.
347
- status , err = libraries .CreateStatusContextFromIndex (index , nil , nil )
337
+ status , err = prettyPrintCorruptedIndexFix (index )
348
338
if err != nil {
349
- if GlobalFlags .Verbose > 0 {
350
- fmt .Println ("ERROR" )
351
- }
352
- fmt .Println ("Cannot parse downloaded index file" )
353
339
return nil
354
340
}
355
- if GlobalFlags .Verbose > 0 {
356
- fmt .Println ("OK" )
357
- }
358
341
}
359
342
360
343
found := false
0 commit comments