Skip to content

Commit

Permalink
Improve documentation around falling back to default config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Dec 14, 2023
1 parent fe5ff88 commit 29a22c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ee/tuf/library_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ func getAutoupdateConfig(args []string) (*autoupdateConfig, error) {
return nil, fmt.Errorf("parsing command-line flags: %w", err)
}

// If the config file wasn't set AND the other flags weren't set, fall back
// to looking in the default config flag file location
// If the config file wasn't set AND the other critical flags weren't set, fall back
// to looking in the default config flag file location. (The update directory and local
// development path are both optional flags and not critical to library lookup
// functionality.) We expect all the flags to be set either via config flag (flConfigFilePath
// is set) or via command line (flRootDirectory and flUpdateChannel are set), but do not
// support a mix of both for this usage.
if flConfigFilePath == "" && flRootDirectory == "" && flUpdateChannel == "" {
return getAutoupdateConfigFromFile(launcher.ConfigFilePath(args))
}
Expand Down

0 comments on commit 29a22c5

Please sign in to comment.