arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.23k stars 370 forks source link

Unable to configure multiple URLs via `ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS` #2643

Closed Links2004 closed 2 weeks ago

Links2004 commented 2 weeks ago

Describe the problem

Multiple board urls in the ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS configuration environment variable are not longer working.

To reproduce

nightly broken:

$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://espressif.github.io/arduino-esp32/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json"
$ ./arduino-cli version
arduino-cli  Version: nightly-20240617 Commit: c9c90df Date: 2024-06-17T01:33:09Z
$ ./arduino-cli core update-index 
Downloading index: package_index.tar.bz2 downloaded                                                  
Downloading index: package_esp8266com_index.json Server responded with: 404 Not Found                
Some indexes could not be updated.

V1.0.0 broken:

$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://espressif.github.io/arduino-esp32/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json"
$ ./arduino-cli version
arduino-cli  Version: 1.0.0 Commit: 05c9852a Date: 2024-06-12T14:13:32Z
$ ./arduino-cli core update-index 
Downloading index: package_index.tar.bz2 downloaded                                                  
Downloading index: package_esp8266com_index.json Server responded with: 404 Not Found                
Some indexes could not be updated.

V0.35.3 ok:

$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://espressif.github.io/arduino-esp32/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json"
$ arduino-cli version
arduino-cli  Version: 0.35.3-arch Commit: 95cfd654fe0dd6b07e903d3132c0faceabfbe9e3 Date: 
$  arduino-cli core update-index 
Downloading index: package_index.tar.bz2 downloaded                                                                                                           
Downloading index: package_esp32_index.json downloaded                                                                                                        
Downloading index: package_esp8266com_index.json downloaded  

Expected behavior

arduino-cli core update-index works the same as it is working with 0.35.3:

https://arduino.github.io/arduino-cli/dev/configuration/#environment-variables

ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS environment variables can be a list of space-separated URLs.

Arduino CLI version

arduino-cli Version: nightly-20240617 Commit: c9c90df Date: 2024-06-17T01:33:09Z

Operating system

Linux

Operating system version

arch + github actions

Additional context

The regression point is https://github.com/arduino/arduino-cli/commit/4c50868a2ad1733a280479acb3b5f1a3f3bbccbc

Issue checklist

cmaglie commented 2 weeks ago

@Links2004 thanks for the bug report, the nightly build should be updated soon with the fix. The fix will be released also in version 1.0.1.