From 7fb83230d389e1dec17eb309b3b98d0259065af5 Mon Sep 17 00:00:00 2001 From: James Brechtel Date: Wed, 20 May 2026 15:18:11 -0400 Subject: [PATCH] fix: correct createProcess tuple order in readProcessBytes 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. --- src/Roux/Server.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Roux/Server.hs b/src/Roux/Server.hs index 2a7e3bd..269646d 100644 --- a/src/Roux/Server.hs +++ b/src/Roux/Server.hs @@ -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