mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-19 01:14:49 -05:00
fix(containermanager): add MultiWriter to podman (#2073)
* feat(providers): show pull progress when downloading container images * fix(containermanager): add MultiWriter to podman
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -482,6 +483,11 @@ func (p *Podman) run(ctx context.Context, args []string, opts runOptions) (strin
|
||||
cmd.Stdout = &stdout
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
if opts.TailLogs {
|
||||
cmd.Stdout = io.MultiWriter(&stdout, os.Stdout)
|
||||
cmd.Stderr = io.MultiWriter(&stderr, os.Stderr)
|
||||
}
|
||||
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
captured := strings.TrimSpace(stderr.String())
|
||||
|
||||
Reference in New Issue
Block a user