From 6b60b02215da1dfc5d4da52e6d2ed58f552f2f2b Mon Sep 17 00:00:00 2001 From: Kimmo Lehto Date: Mon, 19 Apr 2021 09:33:36 +0300 Subject: [PATCH] Fix closing WinRM stdout twice (#22) --- winrm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winrm.go b/winrm.go index c42f41ca..10c24ec0 100644 --- a/winrm.go +++ b/winrm.go @@ -253,7 +253,7 @@ func (c *WinRM) Exec(cmd string, opts ...exec.Option) error { gotErrors = true o.LogErrorf("%s: %s", c, err.Error()) } - command.Stdout.Close() + command.Stderr.Close() }() command.Wait()