git-lfs/subprocess/subprocess_windows.go
Taylor Jones be73bc08dd Fix for #1874
Created subprocess.Cmd wrapper to autoclose any created pipes
Removing original fix for #1860
2017-01-19 09:37:26 -05:00

17 lines
330 B
Go

// +build windows
package subprocess
import (
"os/exec"
"syscall"
)
// ExecCommand is a small platform specific wrapper around os/exec.Command
func ExecCommand(name string, arg ...string) *Cmd {
cmd := exec.Command(name, arg...)
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
cmd.Env = env
return newCmd(cmd)
}