print errors after default values

This commit is contained in:
Roy Olav Purser 2021-06-18 11:56:07 +02:00
parent b2f0878c5a
commit ab7e9ada6f
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -128,7 +128,18 @@ func (c *Config) Status() (ok bool) {
err := v.parsed.err
if err != nil {
ok = false
fmt.Fprintln(os.Stderr, err)
if !v.empty {
fmt.Fprintln(os.Stderr, err)
}
}
}
if !ok {
fmt.Fprintln(os.Stderr, "")
for _, v := range c.env {
err := v.parsed.err
if (err != nil) && v.empty {
fmt.Fprintln(os.Stderr, err)
}
}
}
}