Skip to content

Commit 0d70c07

Browse files
authored
chore(ci): buildtools update addon command fails (#3102)
1 parent ea5e7b2 commit 0d70c07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/helpers/command.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"os/exec"
9+
"strings"
910

1011
"github.com/sirupsen/logrus"
1112
)
@@ -53,8 +54,8 @@ func (h *Helpers) RunCommandWithOptions(opts RunCommandOptions, bin string, args
5354
if ctx.Err() != nil {
5455
return ctx.Err()
5556
}
56-
if stderr.String() != "" {
57-
return fmt.Errorf("%w: %s", err, stderr.String())
57+
if errStr := strings.TrimSpace(stderr.String()); errStr != "" {
58+
return fmt.Errorf("%w: %s", err, errStr)
5859
}
5960
return err
6061
}

0 commit comments

Comments
 (0)