mirror of https://github.com/docker/compose.git
non-tty progress write to stdout
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
a2d335271a
commit
057f23ed75
|
@ -37,7 +37,7 @@ func (p *plainWriter) Start(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *plainWriter) Event(e Event) {
|
func (p *plainWriter) Event(e Event) {
|
||||||
fmt.Println(e.ID, e.Text, e.StatusText)
|
fmt.Fprintln(p.out, e.ID, e.Text, e.StatusText)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *plainWriter) Stop() {
|
func (p *plainWriter) Stop() {
|
||||||
|
|
|
@ -89,6 +89,11 @@ func runConvert(ctx context.Context, opts convertOptions, services []string) err
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if opts.quiet {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var out io.Writer = os.Stdout
|
var out io.Writer = os.Stdout
|
||||||
if opts.Output != "" {
|
if opts.Output != "" {
|
||||||
file, err := os.Create(opts.Output)
|
file, err := os.Create(opts.Output)
|
||||||
|
|
Loading…
Reference in New Issue