mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
just close it earlier
This commit is contained in:
parent
c55dd04671
commit
a5668d426d
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,6 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] =
|
||||||
args = args[1..^1],
|
args = args[1..^1],
|
||||||
options = {poUsePath}
|
options = {poUsePath}
|
||||||
)
|
)
|
||||||
p.inputStream.close()
|
|
||||||
let outstrm = outputStream p
|
let outstrm = outputStream p
|
||||||
let errstrm = errorStream p
|
let errstrm = errorStream p
|
||||||
# result.exitCode = -1
|
# result.exitCode = -1
|
||||||
|
@ -40,13 +39,14 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] =
|
||||||
# inc cnt
|
# inc cnt
|
||||||
echo "process should have started?"
|
echo "process should have started?"
|
||||||
echo p.running, "<--running?"
|
echo p.running, "<--running?"
|
||||||
|
close p
|
||||||
result = (
|
result = (
|
||||||
readAll outstrm,
|
readAll outstrm,
|
||||||
readAll errstrm,
|
readAll errstrm,
|
||||||
-1,
|
-1,
|
||||||
)
|
)
|
||||||
result.exitCode = waitForExit p
|
# result.exitCode = waitForExit p
|
||||||
close p
|
# close p
|
||||||
|
|
||||||
proc runCmdCaptWithSpinner*(cmd: string, msg: string = ""): tuple[output, err: string] =
|
proc runCmdCaptWithSpinner*(cmd: string, msg: string = ""): tuple[output, err: string] =
|
||||||
debug fmt"running command: {cmd}"
|
debug fmt"running command: {cmd}"
|
||||||
|
|
Loading…
Reference in a new issue