lndcfg: give verbose err when failed to load config

This commit is contained in:
yyforyongyu
2021-09-29 04:37:05 +08:00
parent 410606b082
commit 98ca821085
2 changed files with 3 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ func main() {
if err != nil {
if e, ok := err.(*flags.Error); !ok || e.Type != flags.ErrHelp {
// Print error if not due to help request.
err = fmt.Errorf("failed to load config: %w", err)
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}