Skip to content

Commit c4c8003

Browse files
committed
Fix close of pipe wich was auto closed by cmd itself
1 parent b16cf4f commit c4c8003

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

env/load_php_file.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package env
22

33
import (
44
"fmt"
5-
"io"
65
"os"
76
"os/exec"
87
"path/filepath"
@@ -36,13 +35,6 @@ func loadPHPFile(envMap map[string]string, directory string, filename string) er
3635
return errors.Wrapf(err, "failed to create stdout pipe for reading %s", filePath)
3736
}
3837

39-
defer func(stdout io.ReadCloser) {
40-
err := stdout.Close()
41-
if err != nil {
42-
panic(errors.Wrapf(err, "failed to close stdout pipe for %s", filePath))
43-
}
44-
}(stdout)
45-
4638
if err := cmd.Start(); err != nil {
4739
return errors.Wrapf(err, "failed to start command for reading %s", filePath)
4840
}

0 commit comments

Comments
 (0)