You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to support setting the configuration file using an environment variable?
Currently it's possible to set the config file through multiple ways, like --config-file and by auto checking the current and parent directories. However, using an environment variable to ensure all the upcoming commands will be using the correct config file would ensure consistency and confidence in the result.
Note, as a current workaround, I'm shadowing the arduino-cli command using the following bash function, which indeed works, but it's not a clean solution.
arduino-cli() {
if [ -n "$ARDUINO_CONFIG" ]; then
# ARDUINO_CONFIG is set, use it with --config-file
command arduino-cli --config-file "${ARDUINO_CONFIG}" "$@"
else
# ARDUINO_CONFIG is not set, call arduino-cli normally
command arduino-cli "$@"
fi
}
Describe the current behavior
No environment variable are mentioned in the documentation that would set the --config-file
👋 We currently support something similar via ARDUINO_DIRECTORIES_DATA. When that env var is set the cli will search for arduino-cli.yaml in the path specified by that env. (if you're curious here is the snippet).
However, I've just rechecked my use case, and I do have multiple configuration files in the same directory, each with a different name, thus this solution of specifying a directory for the arduino-cli.yaml does not allow arbitrary configuration file naming as allowed by --config-file
Describe the request
Is it possible to support setting the configuration file using an environment variable?
Currently it's possible to set the config file through multiple ways, like
--config-file
and by auto checking the current and parent directories. However, using an environment variable to ensure all the upcoming commands will be using the correct config file would ensure consistency and confidence in the result.Note, as a current workaround, I'm shadowing the arduino-cli command using the following bash function, which indeed works, but it's not a clean solution.
Describe the current behavior
No environment variable are mentioned in the documentation that would set the --config-file
Arduino CLI version
Version: 0.34.2
Operating system
Linux
Operating system version
Any
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: