From 72123ada7dc1121bd1a4363553bc9d52bf4b05bb Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 24 Apr 2019 23:05:29 +0800 Subject: [PATCH] fix windows build (#36) --- go.mod | 1 - tool/kratos/build.go | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 3ce3645f4..338e89f93 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/go-sql-driver/mysql v1.4.1 github.com/gogo/protobuf v1.2.0 github.com/golang/protobuf v1.2.0 - github.com/kr/pty v1.1.4 github.com/leodido/go-urn v1.1.0 // indirect github.com/montanaflynn/stats v0.5.0 github.com/pkg/errors v0.8.1 diff --git a/tool/kratos/build.go b/tool/kratos/build.go index 1eaeaa89f..0265db814 100644 --- a/tool/kratos/build.go +++ b/tool/kratos/build.go @@ -1,22 +1,18 @@ package main import ( - "io" "os" "os/exec" - "github.com/kr/pty" "github.com/urfave/cli" ) func buildAction(c *cli.Context) error { args := append([]string{"build"}, c.Args()...) - // fmt.Println(args) cmd := exec.Command("go", args...) - f, err := pty.Start(cmd) - if err != nil { + cmd.Stdout = os.Stdout + if err := cmd.Run(); err != nil { panic(err) } - io.Copy(os.Stdout, f) return nil }