1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +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 {
case "darwin", "linux":
cmd = exec.Command("sh", "-c", c.Command)
case "windows": //TODO
case "windows":
cmd = exec.Command("cmd", "/C", c.Command)
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr