Update-index could make other commands not work #81
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
type: enhancement
Proposed improvement
Milestone
BUG
Steps to reproduce
.cli-config.yml
http://google.com/package_lalala_index.json
. But let's imagine that URL is correct and should contain realpackage_lalala_index.json
, but the server has gone down and returns 500 HTTP error.arduino-cli core update-index
— it says all packages downloadedExpected behavior
On the last step (
update-index
) we get an HTTP 500 error.Probably, get an error in the
stderr
, but download other, available and valid, package indexes.And then I can run
arduino-cli core list
and see no errors.Actual behavior
It says all packages were downloaded:
But when you run commands like
arduino-cli core list
orarduino-cli board listall
it exits with an error:It occurs, because
package_lalala_index.json
contains 404 HTML page.Proposal how to fix
After downloading — check is it valid JSON (just try to parse).
And if not — delete it and add an error into
stderr
.And if its possible to verify that is valid package file, it will be awesome.
The text was updated successfully, but these errors were encountered: