add a reader that takes stdin (#7074)

This commit is contained in:
Becca Petrin
2019-07-05 13:36:44 -07:00
committed by GitHub
parent 30de18eb23
commit 3cc7f4a68c

View File

@@ -1,6 +1,7 @@
package command
import (
"bufio"
"bytes"
"fmt"
"io"
@@ -134,6 +135,7 @@ func RunCustom(args []string, runOpts *RunOptions) int {
ErrorColor: cli.UiColorRed,
WarnColor: cli.UiColorYellow,
Ui: &cli.BasicUi{
Reader: bufio.NewReader(os.Stdin),
Writer: runOpts.Stdout,
ErrorWriter: uiErrWriter,
},
@@ -146,6 +148,7 @@ func RunCustom(args []string, runOpts *RunOptions) int {
ErrorColor: cli.UiColorRed,
WarnColor: cli.UiColorYellow,
Ui: &cli.BasicUi{
Reader: bufio.NewReader(os.Stdin),
Writer: runOpts.Stdout,
},
},