From c492466583aa9c76fa71e7d6151626c8cfe4f5ea Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Tue, 14 Feb 2023 11:34:19 -0800 Subject: [PATCH] Always return full RunBackgroundShell output Fixes #2459 --- internal/shell/shell.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/shell/shell.go b/internal/shell/shell.go index f5871c79..c38e6e88 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -8,7 +8,6 @@ import ( "os" "os/exec" "os/signal" - "strings" shellquote "github.com/kballard/go-shellquote" "github.com/zyedidia/micro/v2/internal/screen" @@ -59,15 +58,10 @@ func RunBackgroundShell(input string) (func() string, error) { inputCmd := args[0] return func() string { output, err := RunCommand(input) - totalLines := strings.Split(output, "\n") str := output - if len(totalLines) < 3 { - if err == nil { - str = fmt.Sprint(inputCmd, " exited without error") - } else { - str = fmt.Sprint(inputCmd, " exited with error: ", err, ": ", output) - } + if err != nil { + str = fmt.Sprint(inputCmd, " exited with error: ", err, ": ", output) } return str }, nil