diff --git a/main/config_json.go b/main/config_json.go index 6a826d7ac..0db6bc467 100644 --- a/main/config_json.go +++ b/main/config_json.go @@ -18,6 +18,7 @@ func jsonToProto(input io.Reader) (*core.Config, error) { cmd := exec.Command(v2ctl, "config") cmd.Stdin = input cmd.Stderr = os.Stderr + cmd.SysProcAttr = getSysProcAttr() stdoutReader, err := cmd.StdoutPipe() if err != nil { diff --git a/main/config_json_other.go b/main/config_json_other.go new file mode 100644 index 000000000..b1502710e --- /dev/null +++ b/main/config_json_other.go @@ -0,0 +1,9 @@ +// +build !windows + +package main + +import "syscall" + +func getSysProcAttr() *syscall.SysProcAttr { + return nil +} diff --git a/main/config_json_windows.go b/main/config_json_windows.go new file mode 100644 index 000000000..01c2b53ba --- /dev/null +++ b/main/config_json_windows.go @@ -0,0 +1,11 @@ +// +build windows + +package main + +import "syscall" + +func getSysProcAttr() *syscall.SysProcAttr { + return &syscall.SysProcAttr{ + HideWindow: true, + } +}