mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Let aggregator look for config files in similiar places like the other tools. (#440)
This commit is contained in:
parent
f2657bb51a
commit
7d3c3a68df
2 changed files with 12 additions and 2 deletions
|
|
@ -132,8 +132,9 @@ type config struct {
|
|||
|
||||
// configPaths are the potential file locations of the config file.
|
||||
var configPaths = []string{
|
||||
// TODO: Make symmetric to checker and downloader.
|
||||
"aggregator.toml",
|
||||
"~/.config/csaf/aggregator.toml",
|
||||
"~/.csaf_aggregator.toml",
|
||||
"csaf_aggregator.toml",
|
||||
}
|
||||
|
||||
// parseArgsConfig parse the command arguments and loads configuration
|
||||
|
|
|
|||
|
|
@ -15,6 +15,15 @@ Help Options:
|
|||
-h, --help Show this help message
|
||||
```
|
||||
|
||||
If no config file is explictly given the follwing places are searched for a config file:
|
||||
```
|
||||
~/.config/csaf/aggregator.toml
|
||||
~/.csaf_aggregator.toml
|
||||
csaf_aggregator.toml
|
||||
```
|
||||
|
||||
with `~` expanding to `$HOME` on unixoid systems and `%HOMEPATH` on Windows systems.
|
||||
|
||||
Usage example for a single run, to test if the config is good:
|
||||
```bash
|
||||
./csaf_aggregator -c docs/examples/aggregator.toml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue