Skip to content

Commit 6975f0d

Browse files
committed
wip(fix): reproduce broken error message
1 parent d125cdc commit 6975f0d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pty.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"io"
1010
"os"
1111
"os/exec"
12-
"strings"
1312
"syscall"
1413

1514
"github.com/caarlos0/go-shellwords"
@@ -45,12 +44,7 @@ func executeCommand(config Config) (string, error) {
4544
var errorOut bytes.Buffer
4645
go func() {
4746
_, _ = io.Copy(&out, pty)
48-
splittedOut := strings.Split(out.String(), "\n")
49-
if len(splittedOut) > 0 {
50-
errorOut.WriteString(splittedOut[0])
51-
} else {
52-
errorOut.WriteString(out.String())
53-
}
47+
errorOut.WriteString(out.String())
5448
}()
5549

5650
err = cmd.Wait()

0 commit comments

Comments
 (0)