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:
parent
6c1fb14044
commit
72123ada7d
1
go.mod
1
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
|
||||
|
@ -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…
x
Reference in New Issue
Block a user