mirror of
https://github.com/chenasraf/sofmani.git
synced 2026-05-18 01:29:02 +00:00
fix: show defaults log only when actually applying defaults
This commit is contained in:
@@ -137,6 +137,14 @@ func RunInstaller(config *appconfig.AppConfig, installer IInstaller) error {
|
||||
info := installer.GetData()
|
||||
name := *info.Name
|
||||
curOS := platform.GetPlatform()
|
||||
|
||||
// Log if defaults were applied for this installer type
|
||||
if config.Defaults != nil && config.Defaults.Type != nil {
|
||||
if _, ok := (*config.Defaults.Type)[info.Type]; ok {
|
||||
logger.Debug("Applying defaults for %s", info.Type)
|
||||
}
|
||||
}
|
||||
|
||||
logger.Debug("Checking if %s (%s) should run on %s", name, info.Type, curOS)
|
||||
env := config.Environ()
|
||||
if !installer.GetData().Platforms.GetShouldRunOnOS(curOS) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package installer
|
||||
|
||||
import (
|
||||
"github.com/chenasraf/sofmani/appconfig"
|
||||
"github.com/chenasraf/sofmani/logger"
|
||||
"github.com/chenasraf/sofmani/platform"
|
||||
"maps"
|
||||
)
|
||||
@@ -20,7 +19,6 @@ func InstallerWithDefaults(
|
||||
// per-type overrides from defaults
|
||||
if defaults != nil && defaults.Type != nil {
|
||||
if override, ok := (*defaults.Type)[installerType]; ok {
|
||||
logger.Debug("Applying defaults for %s", installerType)
|
||||
if override.Opts != nil {
|
||||
source := *override.Opts
|
||||
target := *data.Opts
|
||||
|
||||
Reference in New Issue
Block a user