Fixed panic if malformed 3rd party url is specified by cmaglie · Pull Request #2817 · arduino/arduino-cli (original) (raw)
Please check if the PR fulfills these requirements
- The PR has no duplicates (please search among the Pull Requests
before creating one) - The PR follows
our contributing guidelines - Tests for the changes have been added (for bug fixes / features)
- Docs have been added / updated (for bug fixes / features)
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated if new parameters are added.
What kind of change does this PR introduce?
Fix the panic reported in #2786
What is the current behavior?
The arduino-cli panics by reproducing the steps described in #2786
What is the new behavior?
$ arduino-cli update-index
Error initializing instance: Invalid additional URL: parse "foo=https://arduino.esp8266.com/stable/package_esp8266com_index.json": first path segment in URL cannot contain colon
Downloading index: package_index.tar.bz2 downloaded
Downloading index: foo=https://espressif.github.io/arduino-esp32/package_esp32_index.json Unable to parse URL: parse "foo=https://espressif.github.io/arduino-esp32/package_esp32_index.json": first path segment in URL cannot contain colon
Some indexes could not be updated.
$
Does this PR introduce a breaking change, and is titled accordingly?
Other information
Fix #2786