CLI cannot gracefully handle invalid 3rd party URLs when initializing the index #2254
Closed
3 tasks done
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
I am working on arduino/arduino-ide#2021 after #2119. I experience error messages when I initialize the
directories.data
folder viacore update-index
, and an invalid 3rd party URL is defined. The same problem is present via the gRPC API.To reproduce
I have a bleeding edge CLI from 1a85d16. Probably, the issue can be reproduced from 62bb4c4.
This is my CLI
directories
andadditional_urls
config:My
directories.data
location is "empty":ls ~/Library/Arduino15 inventory.yaml
❌ Update the indexes using the CLI config. It fails:
./arduino-cli core update-index --config-file ~/.arduinoIDE/arduino-cli.yaml --format json
❌ Try to run a platform search. It also fails:
Expected behavior
The CLI can gracefully handle when a 3rd party package URL is invalid during the index update.
The CLI reports if the URL is invalid. This is working as expected in IDE
2.1.1
with CLI0.33.1
.If I use the default
text
output, I see the expectedno such host
error. But it's missing from the JSON and gRPC levels.Arduino CLI version
62bb4c4
Operating system
macOS
Operating system version
13.4.1
Additional context
I have noticed that although there is an error message, the primary package and the libraries index files are there, and the tools exist.
I have also noticed that executing any subsequent
core search
commands produce the same error message, whilecore list
does not.Issue checklist
The text was updated successfully, but these errors were encountered: