From c7b412ca3f2313fe730b48b173539b9c7db2f614 Mon Sep 17 00:00:00 2001 From: Peter Gren Date: Sat, 15 Jul 2017 18:42:46 +0200 Subject: [PATCH] Fixed ignoring of LIBRARY_INDEX_URL of system property --- arduino-core/src/cc/arduino/Constants.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arduino-core/src/cc/arduino/Constants.java b/arduino-core/src/cc/arduino/Constants.java index 80349d82d..ea0690240 100644 --- a/arduino-core/src/cc/arduino/Constants.java +++ b/arduino-core/src/cc/arduino/Constants.java @@ -80,10 +80,15 @@ public class Constants { String externalLibraryIndexUrl = System.getProperty("LIBRARY_INDEX_URL"); if (externalLibraryIndexUrl != null && !"".equals(externalLibraryIndexUrl)) { LIBRARY_INDEX_URL = externalLibraryIndexUrl; + LIBRARY_INDEX_URL_GZ = ""; + String externalLibraryIndexUrlGz = System.getProperty("LIBRARY_INDEX_URL_GZ"); + if (externalLibraryIndexUrlGz != null && !"".equals(externalLibraryIndexUrlGz)) { + LIBRARY_INDEX_URL_GZ = externalLibraryIndexUrlGz; + } } else { LIBRARY_INDEX_URL = "http://downloads.arduino.cc/libraries/library_index.json"; + LIBRARY_INDEX_URL_GZ = "http://downloads.arduino.cc/libraries/library_index.json.gz"; } - LIBRARY_INDEX_URL_GZ = "http://downloads.arduino.cc/libraries/library_index.json.gz"; } }