mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Close logger and flush messages in update command
This commit is contained in:
parent
866f1981e0
commit
9a7972c27f
1 changed files with 3 additions and 0 deletions
|
@ -46,6 +46,8 @@ func downloadUpdates() error {
|
||||||
"all/ui/modules/base.zip",
|
"all/ui/modules/base.zip",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
log.SetLogLevel(log.InfoLevel)
|
||||||
|
|
||||||
// logging is configured as a persistent pre-run method inherited from
|
// logging is configured as a persistent pre-run method inherited from
|
||||||
// the root command but since we don't use run.Run() we need to start
|
// the root command but since we don't use run.Run() we need to start
|
||||||
// logging ourself.
|
// logging ourself.
|
||||||
|
@ -53,6 +55,7 @@ func downloadUpdates() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("failed to start logging: %s\n", err)
|
fmt.Printf("failed to start logging: %s\n", err)
|
||||||
}
|
}
|
||||||
|
defer log.Shutdown()
|
||||||
|
|
||||||
return registry.DownloadUpdates(context.TODO())
|
return registry.DownloadUpdates(context.TODO())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue