fix SetupConsoleLogger which is a noop (#1564)

When App.Before is called the options are not parsed yet, use
Command.Before instead.
This commit is contained in:
Earl Warren 2023-01-26 03:09:09 +01:00 committed by GitHub
parent fbbfd61aac
commit 222ff11fd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,9 @@ func newApp() *cli.App {
Out: os.Stderr, Out: os.Stderr,
}, },
) )
app.Before = common.SetupConsoleLogger for _, command := range app.Commands {
command.Before = common.SetupConsoleLogger
}
return app return app
} }