diff --git a/modules/shell/command.go b/modules/shell/command.go index ffa503713..9c20c8e0e 100644 --- a/modules/shell/command.go +++ b/modules/shell/command.go @@ -176,7 +176,14 @@ func readData(t testing.TestingT, log *logger.Logger, reader *bufio.Reader, writ break } + // logger.Logger has a Logf method, but not a Log method. + // We have to use the format string indirection to avoid + // interpreting any possible formatting characters in + // the line. + // + // See https://github.com/gruntwork-io/terratest/issues/982. log.Logf(t, "%s", line) + if _, err := writer.WriteString(line); err != nil { return err }