diff --git a/configstack/stack.go b/configstack/stack.go index d0dc86b60..51602ea86 100644 --- a/configstack/stack.go +++ b/configstack/stack.go @@ -3,6 +3,7 @@ package configstack import ( "bytes" "fmt" + "io" "sort" "strings" @@ -61,7 +62,7 @@ func (stack *Stack) Run(terragruntOptions *options.TerragruntOptions) error { // We capture the out stream for each module errorStreams := make([]bytes.Buffer, len(stack.Modules)) for n, module := range stack.Modules { - module.TerragruntOptions.ErrWriter = &errorStreams[n] + module.TerragruntOptions.ErrWriter = io.MultiWriter(module.TerragruntOptions.ErrWriter, &errorStreams[n]) } defer stack.summarizePlanAllErrors(terragruntOptions, errorStreams) }