Skip to content

Commit 7cbd786

Browse files
committed
add verbosity
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
1 parent 80919f9 commit 7cbd786

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/executor/executor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ func (e *Executor) RunAndLogLines(logLabels map[string]string) (*CmdUsage, error
108108
err := e.cmd.Run()
109109
if err != nil {
110110
if len(stdErr.Bytes()) > 0 {
111-
return nil, fmt.Errorf("%s", stdErr.String())
111+
return nil, fmt.Errorf("stderr: %s", stdErr.String())
112112
}
113113

114-
return nil, err
114+
return nil, fmt.Errorf("cmd run: %w", err)
115115
}
116116

117117
var usage *CmdUsage
@@ -129,7 +129,7 @@ func (e *Executor) RunAndLogLines(logLabels map[string]string) (*CmdUsage, error
129129
}
130130
}
131131

132-
return usage, err
132+
return usage, nil
133133
}
134134

135135
type proxyLogger struct {
@@ -175,7 +175,7 @@ func (pl *proxyLogger) Write(p []byte) (int, error) {
175175
// fall back to using the logger
176176
pl.logger.Info(string(p))
177177

178-
return len(p), err
178+
return len(p), nil
179179
}
180180

181181
// logEntry.Log(log.FatalLevel, string(logLine))

0 commit comments

Comments
 (0)