1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 09:45:14 +01:00

close readers when done with reading (#557)

Signed-off-by: Rafael Matias <rafael@skyle.net>
This commit is contained in:
Rafael Matias
2023-06-26 14:27:06 +02:00
committed by GitHub
parent 3f3e70092c
commit 054d55e8a4

View File

@@ -91,6 +91,8 @@ func (p ProcessExecutor) RunProcess(executable string, execArgs ...interface{})
scanner := bufio.NewScanner(io.MultiReader(outReader, errReader))
go func() {
defer outReader.Close()
defer errReader.Close()
for scanner.Scan() {
fmt.Println(scanner.Text())
}