1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

fix windows build (#36)

This commit is contained in:
Tony 2019-04-24 23:05:29 +08:00 committed by Felix Hao
parent 6c1fb14044
commit 72123ada7d
2 changed files with 2 additions and 7 deletions

1
go.mod
View File

@ -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

View File

@ -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
}