From f5b077ef898404b674b74b59a93579691cc3cbd7 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Fri, 15 May 2026 20:26:57 +0300 Subject: [PATCH] fix(logs): remove unnecessary group logs --- installer/installer.go | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/installer/installer.go b/installer/installer.go index 727d3a9..48f2462 100755 --- a/installer/installer.go +++ b/installer/installer.go @@ -193,6 +193,11 @@ func RunInstaller(config *appconfig.AppConfig, installer IInstaller) (*summary.I Type: string(info.Type), } + // Group installers fully delegate work to their children; the group's own + // install/update/check lifecycle is a no-op wrapper, so suppress the + // per-step Info logs and let the children speak for themselves. + isDelegating := info.Type == appconfig.InstallerTypeGroup + // Set skip summary flags if configured if info.SkipSummary != nil { result.SkipSummaryInstall = info.SkipSummary.Install @@ -284,13 +289,17 @@ func RunInstaller(config *appconfig.AppConfig, installer IInstaller) (*summary.I logger.Debug("%s: %s is already installed", logger.H(string(info.Type)), logger.H(name)) if *config.CheckUpdates { - logger.Info("Checking updates for %s: %s", logger.H(string(info.Type)), logger.H(name)) + if !isDelegating { + logger.Info("Checking updates for %s: %s", logger.H(string(info.Type)), logger.H(name)) + } needsUpdate, err := installer.CheckNeedsUpdate() if err != nil { return nil, err } if needsUpdate { - logger.Info("Updating %s", logger.H(name)) + if !isDelegating { + logger.Info("Updating %s", logger.H(name)) + } if info.PreUpdate != nil { logger.Debug("Running pre-update command for %s", logger.H(name)) err := utils.RunCmdPassThrough(env, utils.GetOSShell(installer.GetData().EnvShell), utils.GetOSShellArgs(applyTmpl(*info.PreUpdate))...) @@ -312,14 +321,18 @@ func RunInstaller(config *appconfig.AppConfig, installer IInstaller) (*summary.I } result.Action = summary.ActionUpgraded } else { - logger.Info("%s: %s is up-to-date", logger.H(string(info.Type)), logger.H(name)) + if !isDelegating { + logger.Info("%s: %s is up-to-date", logger.H(string(info.Type)), logger.H(name)) + } result.Action = summary.ActionUpToDate } } else { result.Action = summary.ActionUpToDate } } else { - logger.Info("Installing %s: %s", logger.H(string(installer.GetData().Type)), logger.H(name)) + if !isDelegating { + logger.Info("Installing %s: %s", logger.H(string(installer.GetData().Type)), logger.H(name)) + } if info.PreInstall != nil { logger.Debug("Running pre-install command for %s: %s", logger.H(string(info.Type)), logger.H(name)) err := utils.RunCmdPassThrough(env, utils.GetOSShell(installer.GetData().EnvShell), utils.GetOSShellArgs(applyTmpl(*info.PreInstall))...)