1
0
mirror of https://github.com/beego/bee.git synced 2024-11-25 20:10:55 +00:00

Adds Windows support for command execution

This commit is contained in:
Faissal Elamraoui 2017-03-18 20:10:43 +01:00
parent 855ac34dd3
commit 77a36964e5

View File

@ -87,7 +87,8 @@ func (c *customCommand) run() error {
switch runtime.GOOS { switch runtime.GOOS {
case "darwin", "linux": case "darwin", "linux":
cmd = exec.Command("sh", "-c", c.Command) cmd = exec.Command("sh", "-c", c.Command)
case "windows": //TODO case "windows":
cmd = exec.Command("cmd", "/C", c.Command)
} }
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr