From 30055af03e357b44cfbacb3088eab337a94e51e8 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 18 Mar 2016 16:06:53 -0400 Subject: [PATCH 1/2] config: fallover correctly to default config --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 5004822f..9a1bac71 100644 --- a/config/config.go +++ b/config/config.go @@ -92,7 +92,7 @@ func Load(path string) (config *Config, err error) { var cfgFile File cfgFile.Clair = DefaultConfig() if path == "" { - return + return &cfgFile.Clair, nil } f, err := os.Open(os.ExpandEnv(path)) From 7ca9127bbec404b9e2edbb5919a610dc0ac6a4fc Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 18 Mar 2016 16:07:35 -0400 Subject: [PATCH 2/2] main: default config to /etc/clair/config.yml --- cmd/clair/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/clair/main.go b/cmd/clair/main.go index d5aa90b0..e04ddbdd 100644 --- a/cmd/clair/main.go +++ b/cmd/clair/main.go @@ -50,7 +50,7 @@ var log = capnslog.NewPackageLogger("github.com/coreos/clair/cmd/clair", "main") func main() { // Parse command-line arguments flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError) - flagConfigPath := flag.String("config", "", "Load configuration from the specified file.") + flagConfigPath := flag.String("config", "/etc/clair/config.yaml", "Load configuration from the specified file.") flagCPUProfilePath := flag.String("cpu-profile", "", "Write a CPU profile to the specified file before exiting.") flagLogLevel := flag.String("log-level", "info", "Define the logging level.") flag.Parse()