3 ms·
Config file overrides the defaults, Command line flags overrides the configuration file. Don't forget "user configuration file overrides system configuration f
by cperciva 3y ago
Config file overrides the defaults, Command line flags overrides the configuration file.
Don't forget "user configuration file overrides system configuration file (but is overridden by command line)".
In tarsnap the priority (lowest wins) is:
0: Command line
1: ~/.tarsnaprc
2: /etc/tarsnap.conf (may be in a different system etc depending on platform standards)
3: tarsnap defaults.
- spc476 3y agoWhere would configuration options via environment variables fit in? I can see between 0 and 1, or 1 and 2, but can't quite decide which is better.
- cperciva 3y agoNot relevant to tarsnap (and in general something I would be very careful about adding since people often don't realize what's in their environment) but I would say that command line options take priority over the environment and the environment takes priority over all configuration files.
- CoolCold 3y ago+1 on both points - support for env and handling env priority