diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index aa4eb187ba42f..9b11d440b2822 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -539,7 +539,7 @@ when defined(Windows) and not defined(useNimRtl): FILE_ATTRIBUTE_NORMAL, 0 # no template file for OPEN_EXISTING ) - if si.hStdOutput == INVALID_HANDLE_VALUE: + if si.hStdInput == INVALID_HANDLE_VALUE: raiseOSError(osLastError()) stdin = myDup(pipeIn, 0)