Skip to content

Commit

Permalink
Merge pull request #562 from dapr/master
Browse files Browse the repository at this point in the history
Merge master branch into release-1.0
  • Loading branch information
wcs1only authored Dec 16, 2020
2 parents 34d3a19 + 3ae4ae2 commit ecb3453
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,31 +102,8 @@ var RunCmd = &cobra.Command{
output.DaprHTTPPort,
output.DaprGRPCPort))

stdErrPipe, pipeErr := output.DaprCMD.StderrPipe()
if pipeErr != nil {
print.FailureStatusEvent(os.Stdout, fmt.Sprintf("Error creating stderr for Dapr: %s", err.Error()))
os.Exit(1)
}

stdOutPipe, pipeErr := output.DaprCMD.StdoutPipe()
if pipeErr != nil {
print.FailureStatusEvent(os.Stdout, fmt.Sprintf("Error creating stdout for Dapr: %s", err.Error()))
os.Exit(1)
}

errScanner := bufio.NewScanner(stdErrPipe)
outScanner := bufio.NewScanner(stdOutPipe)
go func() {
for errScanner.Scan() {
fmt.Println(print.Yellow(fmt.Sprintf("== DAPR == %s\n", errScanner.Text())))
}
}()

go func() {
for outScanner.Scan() {
fmt.Println(print.Yellow(fmt.Sprintf("== DAPR == %s\n", outScanner.Text())))
}
}()
output.DaprCMD.Stdout = os.Stdout
output.DaprCMD.Stderr = os.Stderr

err = output.DaprCMD.Start()
if err != nil {
Expand Down

0 comments on commit ecb3453

Please sign in to comment.