fix windows build (#36)

pull/40/head
Tony 6 years ago committed by Felix Hao
parent 6c1fb14044
commit 72123ada7d
  1. 1
      go.mod
  2. 8
      tool/kratos/build.go

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

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

Loading…
Cancel
Save