From 7108133618991a39a7421f92d173432553330309 Mon Sep 17 00:00:00 2001 From: Yousif Akbar <11247449+yhakbar@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:32:32 -0400 Subject: [PATCH] fix: Removing non non-interactive logic in err stream redirect (#3464) --- configstack/stack.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configstack/stack.go b/configstack/stack.go index 0e1817b7e..d4178143d 100644 --- a/configstack/stack.go +++ b/configstack/stack.go @@ -201,12 +201,9 @@ func (stack *Stack) Run(ctx context.Context, terragruntOptions *options.Terragru errorStreams := make([]bytes.Buffer, len(stack.Modules)) for n, module := range stack.Modules { - if !terragruntOptions.NonInteractive { // redirect output to ErrWriter in case of not NonInteractive mode - module.TerragruntOptions.ErrWriter = io.MultiWriter(&errorStreams[n], module.TerragruntOptions.ErrWriter) - } else { - module.TerragruntOptions.ErrWriter = &errorStreams[n] - } + module.TerragruntOptions.ErrWriter = io.MultiWriter(&errorStreams[n], module.TerragruntOptions.ErrWriter) } + defer stack.summarizePlanAllErrors(terragruntOptions, errorStreams) }