Skip to content

Commit

Permalink
feat: debug logging for updater configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Dec 25, 2024
1 parent d2bce8f commit 1f3f3ac
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,23 @@ func Update(cmd *cobra.Command, args []string) {
initConfiguration.Verbose = verboseRun

brewUpdater, err := brew.BrewUpdater{}.New(*initConfiguration)
brewUpdater.Config.Enabled = err == nil
if err != nil {
brewUpdater.Config.Enabled = false
slog.Debug("Brew driver failed to initialize", slog.Any("error", err))
}

flatpakUpdater, err := flatpak.FlatpakUpdater{}.New(*initConfiguration)
flatpakUpdater.Config.Enabled = err == nil
if err != nil {
flatpakUpdater.Config.Enabled = false
slog.Debug("Flatpak driver failed to initialize", slog.Any("error", err))
}
flatpakUpdater.SetUsers(users)

distroboxUpdater, err := distrobox.DistroboxUpdater{}.New(*initConfiguration)
distroboxUpdater.Config.Enabled = err == nil
if err != nil {
distroboxUpdater.Config.Enabled = false
slog.Debug("Distrobox driver failed to initialize", slog.Any("error", err))
}
distroboxUpdater.SetUsers(users)

mainSystemDriver, mainSystemDriverConfig, _, _ := system.InitializeSystemDriver(*initConfiguration)
Expand Down

0 comments on commit 1f3f3ac

Please sign in to comment.