Skip to content

Commit

Permalink
fix: Removing non non-interactive logic in err stream redirect (#3464)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhakbar authored Oct 10, 2024
1 parent afd5d7f commit 7108133
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions configstack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 7108133

Please sign in to comment.