mirror of
https://github.com/foomo/squadron.git
synced 2025-10-16 12:35:42 +00:00
feat: set stdin
This commit is contained in:
parent
740a5659c0
commit
684859a1fa
@ -141,6 +141,9 @@ func (c *Cmd) Run(ctx context.Context) (string, error) {
|
||||
combinedBuf := new(bytes.Buffer)
|
||||
traceWriter := logrus.StandardLogger().WriterLevel(logrus.TraceLevel)
|
||||
|
||||
if c.stdin != nil {
|
||||
cmd.Stdin = c.stdin
|
||||
}
|
||||
cmd.Stdout = io.MultiWriter(append(c.stdoutWriters, combinedBuf, traceWriter)...)
|
||||
cmd.Stderr = io.MultiWriter(append(c.stderrWriters, combinedBuf, traceWriter)...)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user