process aliases before setting up logging

This commit is contained in:
nils måsén 2023-08-12 17:14:43 +02:00
parent 6b0c37f3d3
commit 426f9ff55b

View file

@ -77,10 +77,10 @@ func Execute() {
// PreRun is a lifecycle hook that runs before the command is executed.
func PreRun(cmd *cobra.Command, _ []string) {
f := cmd.PersistentFlags()
flags.ProcessFlagAliases(f)
if err := flags.SetupLogging(f); err != nil {
log.Fatalf("Failed to initialize logging: %s", err.Error())
}
flags.ProcessFlagAliases(f)
scheduleSpec, _ = f.GetString("schedule")