From 730db4cb2321d923e7691da6cb349eb3ff920110 Mon Sep 17 00:00:00 2001 From: Becca Petrin Date: Fri, 5 Jul 2019 13:03:59 -0700 Subject: [PATCH] add a reader that takes stdin --- command/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/main.go b/command/main.go index 752dfa35b8aa..ffce18109378 100644 --- a/command/main.go +++ b/command/main.go @@ -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, }, },