fix: correct createProcess tuple order in readProcessBytes
Build and Deploy / build-and-deploy (push) Successful in 1m38s
Build and Deploy / build-and-deploy (push) Successful in 1m38s
createProcess returns (stdin, stdout, stderr, process), not (stdout, stderr, _, process). Since stdin is Inherited (not CreatePipe), it returns Nothing, not Just. The pattern (Just outH, Just errH, _, _) was matching on the stdin and stdout fields, so it always fell through to the error branch.
This commit is contained in:
+3
-1
@@ -244,8 +244,10 @@ readProcessBytes cmd args = do
|
||||
, std_err = CreatePipe
|
||||
}
|
||||
result <- createProcess process
|
||||
-- createProcess returns (stdin, stdout, stderr, process).
|
||||
-- stdin is Inherited → Nothing; stdout/stderr are CreatePipe → Just.
|
||||
case result of
|
||||
(Just outH, Just errH, _, ph) -> do
|
||||
(Nothing, Just outH, Just errH, ph) -> do
|
||||
hSetBinaryMode outH True
|
||||
hSetBinaryMode errH True
|
||||
out <- LB.hGetContents outH
|
||||
|
||||
Reference in New Issue
Block a user