fix windows build (#36)
parent
6c1fb14044
commit
72123ada7d
@ -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…
Reference in new issue