From a7b1291be858edd0d555bd7026cd6e2ba050eba5 Mon Sep 17 00:00:00 2001 From: koplas Date: Fri, 27 Jun 2025 17:20:19 +0200 Subject: [PATCH] Print warning if no config file was found --- internal/options/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/options/options.go b/internal/options/options.go index 3a4867f..38b5bd4 100644 --- a/internal/options/options.go +++ b/internal/options/options.go @@ -46,7 +46,6 @@ type Parser[C any] struct { // If a config file was specified it is loaded. // Returns the arguments and the configuration. func (p *Parser[C]) Parse() ([]string, *C, error) { - var cmdLineOpts C if p.SetDefaults != nil { p.SetDefaults(&cmdLineOpts) @@ -82,6 +81,7 @@ func (p *Parser[C]) Parse() ([]string, *C, error) { // No config file -> We are good. if path == "" { + slog.Warn("No config file found. Maybe you want to specify one or store it in a respective default location", "locations", p.DefaultConfigLocations) return args, &cmdLineOpts, nil }