windows tcp conn load issue workaround

This commit is contained in:
Liang Ding 2015-01-12 14:49:52 +08:00
parent 9fb70afb16
commit 93090f93c4
1 changed files with 5 additions and 0 deletions

View File

@ -1050,4 +1050,9 @@ func setCmdEnv(cmd *exec.Cmd, username string) {
"GOARCH="+runtime.GOARCH,
"GOROOT="+runtime.GOROOT(),
"PATH="+os.Getenv("PATH"))
if util.OS.IsWindows() {
// FIXME: for some weird issues on Windows, such as: The requested service provider could not be loaded or initialized.
cmd.Env = append(cmd.Env, os.Environ()...)
}
}