Closed HLWeil closed 2 years ago
This is not endorsed under e.g. linux
System-wide configuration files are usually stored in /etc
, so the tool can ~create a subdirectory such as /etc/arccommander
there and~ safe a configuration file in that ~sub~directory
tools such as git seem to save the global config directly under what is considered the $HOME
environment variable on windows, which on my machine falls to C:\Users\Kevin
. if you take a look at that directory on your machine you should see the .gitconfig
file there.
Many other programs also seem to create subdirectories there, prefixed with a dot. For example, ssh config files are stored in $HOME\.ssh
, vscode config files in $HOME\.vscode
and so on. It is also the default nuget cache location ($HOME\.nuget\packages
), dotnet tools and configs are stored there ($HOME\.dotnet
), etc. So something like $HOME\.arccommander
seems like a good choice.
You could then on runtime check on what OS the tool is running and determine the global config path accordingly.
Thank you!
For a default config
to be put in these locations, this would require kind of an installation
step, right?
Depends a little on how the tool will be published. To my knowledge, a dotnet tool
does not execute post install scripts after dotnet tool install ...
, so for that case you can just create the necessary files on the first run or always check if one is present. you could also provide installer scripts via releases, or go as far and package installers (.deb
for linux, .msi
for windows, etc.)
@omaus, you addressed this, right?
@omaus, you addressed this, right?
Yep, I did. Think we can close this one, too. And reopen it if necessary. 🙂
At the moment, the
global config
file is stored at the the same location as theArcCommander.exe
. This is not endorsed under e.g. linux, and not generally the standard way in windows. Instead, this should be changed to the standard locations for any given os, potentially using an additional library.