Skip to content

Commit

Permalink
refactor enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Oct 29, 2024
1 parent 3fc8432 commit 9ec0f9c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/internal/packager/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ func GetZarfVariableConfig(ctx context.Context) *variables.VariableConfig {
return interactive.PromptVariable(variable)
}

var l *slog.Logger
if logger.Enabled(ctx) {
l = logger.From(ctx)
} else {
l = slog.New(message.ZarfHandler{})
return variables.New("zarf", prompt, logger.From(ctx))
}
return variables.New("zarf", prompt, l)
return variables.New("zarf", prompt, slog.New(message.ZarfHandler{}))
}

// GetZarfTemplates returns the template keys and values to be used for templating.
Expand Down

0 comments on commit 9ec0f9c

Please sign in to comment.