d7a3a090df
From the 1.17 release notes (https://golang.org/doc/go1.17#gofmt): gofmt (and go fmt) now synchronizes //go:build lines with // +build lines. More info about this change can be found at https://golang.org/design/draft-gobuild
19 lines
394 B
Go
19 lines
394 B
Go
//go:build windows
|
|
// +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.Path, _ = LookPath(name)
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
|
cmd.Env = fetchEnvironment()
|
|
return newCmd(cmd)
|
|
}
|