mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
process aliases before setting up logging
This commit is contained in:
parent
6b0c37f3d3
commit
426f9ff55b
1 changed files with 1 additions and 1 deletions
|
|
@ -77,10 +77,10 @@ func Execute() {
|
||||||
// PreRun is a lifecycle hook that runs before the command is executed.
|
// PreRun is a lifecycle hook that runs before the command is executed.
|
||||||
func PreRun(cmd *cobra.Command, _ []string) {
|
func PreRun(cmd *cobra.Command, _ []string) {
|
||||||
f := cmd.PersistentFlags()
|
f := cmd.PersistentFlags()
|
||||||
|
flags.ProcessFlagAliases(f)
|
||||||
if err := flags.SetupLogging(f); err != nil {
|
if err := flags.SetupLogging(f); err != nil {
|
||||||
log.Fatalf("Failed to initialize logging: %s", err.Error())
|
log.Fatalf("Failed to initialize logging: %s", err.Error())
|
||||||
}
|
}
|
||||||
flags.ProcessFlagAliases(f)
|
|
||||||
|
|
||||||
scheduleSpec, _ = f.GetString("schedule")
|
scheduleSpec, _ = f.GetString("schedule")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue