Skip to content

Conversation

@xardael
Copy link
Contributor

@xardael xardael commented Jul 15, 2017

LibraryInstaller uses only GZippedJsonDownloader,
https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java#L65
which should fall back to JsonDwnloader only if the downloading of gziped JSON fails. (In catch block)
https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/GZippedJsonDownloader.java#L54

But if I set LIBRARY_INDEX_URL system property, which is then stored into LIBRARY_INDEX_URL constant, it will be ignored since the LIBRARY_INDEX_URL_GZ takes precedence, and it is set to arduino.cc's librayr_index.json.

So I introduced the possibility to set system property for Gzipped JSON URL as well, and moreover when the LIBRARY_INDEX_URL system property is set and LIBRARY_INDEX_URL_GZ is not, it will get empty string value, and the try block in GZippedJson downloader will fail and JsonDownloader from the catch block will be called.

@xardael xardael changed the title Fixed ignoring of LIBRARY_INDEX_URL of system property Fixed ignoring of LIBRARY_INDEX_URL system property Jul 15, 2017
@cmaglie cmaglie added this to the Release 1.8.4 milestone Jul 18, 2017
@cmaglie cmaglie merged commit c7b412c into arduino:master Jul 18, 2017
@cmaglie
Copy link
Member

cmaglie commented Jul 18, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants