From a5668d426d80dfdd0e098511fb6fd998efcf1261 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 5 Sep 2024 11:10:41 -0500 Subject: [PATCH] just close it earlier --- pkgs/oizys-nim/src/oizys/exec.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/oizys-nim/src/oizys/exec.nim b/pkgs/oizys-nim/src/oizys/exec.nim index b74a307..8dbdbc8 100644 --- a/pkgs/oizys-nim/src/oizys/exec.nim +++ b/pkgs/oizys-nim/src/oizys/exec.nim @@ -23,7 +23,6 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] = args = args[1..^1], options = {poUsePath} ) - p.inputStream.close() let outstrm = outputStream p let errstrm = errorStream p # result.exitCode = -1 @@ -40,13 +39,14 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] = # inc cnt echo "process should have started?" echo p.running, "<--running?" + close p result = ( readAll outstrm, readAll errstrm, -1, ) - result.exitCode = waitForExit p - close p + # result.exitCode = waitForExit p + # close p proc runCmdCaptWithSpinner*(cmd: string, msg: string = ""): tuple[output, err: string] = debug fmt"running command: {cmd}"