-
-
Notifications
You must be signed in to change notification settings - Fork 72
Location of CLI config file #327
Comments
Yes, this is the expected behavior. The IDE starts the CLI with
I can understand the discomfort, but we do not yet want to let any tools and apps to share the same CLI config. Although the CLI is already widely used, it still has a
👍
Thank you for providing the detailed steps for an enhanced config lookup logic. As far as I know, and @ubidefeo can correct me if I am wrong, we are planning to change the current lookup logic, maybe we will unify the config location among the apps and tools but not before having a more stable CLI API. |
Thank you, @kittaakos, for your detailed explanation! |
Let's leave this issue open; your additional user requirements are completely valid. |
Many thanks!! |
@jdmack-uk If you want to use the CLI I advice you to install it as a standalone command line tool. This issue is therefore closed, but feel free to get back to us if you're not ok with it. Thank you |
Is your feature request related to a problem? Please describe.
This doesn't describe a problem, it suggests an improvement.
This discussion is based on the Windows environment, but it is probably equally applicable to Linux and Mac.
The CLI config documentation, found here, describes where CLI looks for a config file:
However, when one opens the CLI config in the IDE (File->Open CLI configuration) it creates/opens
C:\Users\myname\.arduinoProIDE\arduino-cli.yaml
- and it works fine in the IDE.The discomfort is caused by the fact that if the user would like to use the CLI from the command line, it (the CLI) doesn't find the above config file without extra setup work.
Describe the solution you'd like
It would seem more user-friendly (especially to beginners, myself included) if
C:\Users\myname\.arduinoProIDE
were in the list of places the CLI looks for its config (probably best as the last element in the list). That way it would be straightforward to have a single config file for both the IDE and the CLI itself.Describe alternatives you've considered
It sounds philosophically bad for the CLI to look for the file in an IDE-related folder, so a slightly more complex (and versatile) solution would be this:
C:\Users\myname\.arduino-cli
- that's nice because it's similar to the IDE folder)C:\Users\myname\.arduinoProIDE
first and, if not found, uses the one in the default CLI locationC:\Users\myname\.arduinoProIDE
and, from then on, the IDE will find it first and use itC:\Users\myname\.arduinoProIDE
)Additional context
This all started because I changed the directories.data and directories.downloads entries in the config file. I edited it in the IDE, then tried to install boards and compile my sketch using the CLI. The downloads and installations all went to their default locations, as if I hadn't changed the configuration!
I was in a situation where I could type the config file and it had my desired settings, but when I did
arduino-cli config dump
, I got the default values. It was only when I used the--verbose flag
that I discovered that it was using the default values because it couldn't find any config file!This sounds like a situation others might run into.
The text was updated successfully, but these errors were encountered: