File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
2525
2626 "go.bug.st/downloader"
2727
28+ "github.com/arduino/arduino-cli/arduino/cores/packageindex"
2829 "github.com/arduino/arduino-cli/commands"
2930 "github.com/arduino/arduino-cli/common/formatter"
3031 "github.com/arduino/arduino-cli/configs"
@@ -84,6 +85,11 @@ func updateIndex(URL *url.URL) {
8485 os .Exit (commands .ErrNetwork )
8586 }
8687
88+ if _ , err := packageindex .LoadIndex (tmp ); err != nil {
89+ formatter .PrintError (err , "Invalid package index in " + URL .String ())
90+ os .Exit (commands .ErrGeneric )
91+ }
92+
8793 if err := indexDirPath .MkdirAll (); err != nil {
8894 formatter .PrintError (err , "Can't create data directory " + indexDirPath .String ())
8995 os .Exit (commands .ErrGeneric )
You can’t perform that action at this time.
0 commit comments