From 46912c29af2f347b78408f0f6b3f2885ea1fcd0a Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 5 Sep 2024 10:01:12 -0500 Subject: [PATCH] be noisy --- .github/workflows/update.yml | 3 --- pkgs/oizys-nim/src/oizys/exec.nim | 3 +++ pkgs/oizys-nim/src/oizys/nix.nim | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index aaf08f5..7f1febf 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -46,9 +46,6 @@ jobs: - name: Pre-build oizys run: nix build . - - run: > - nix build --dry-run $(nix run . -- output --host othalan --flake . ) - - name: Build run: > nix run . diff --git a/pkgs/oizys-nim/src/oizys/exec.nim b/pkgs/oizys-nim/src/oizys/exec.nim index fb07495..bbc50f4 100644 --- a/pkgs/oizys-nim/src/oizys/exec.nim +++ b/pkgs/oizys-nim/src/oizys/exec.nim @@ -28,13 +28,16 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] = let errstrm = errorStream p result.exitCode = -1 var line: string + var cnt: int while true: + echo cnt if ostrm.readLine(line): result.stdout.add line & '\n' if errstrm.readLine(line): result.stderr.add line & '\n' result.exitCode = peekExitCode(p) if result.exitCode != -1: break + inc cnt # result = ( # readAll p.outputStream, diff --git a/pkgs/oizys-nim/src/oizys/nix.nim b/pkgs/oizys-nim/src/oizys/nix.nim index 776bebd..a5c0d2d 100644 --- a/pkgs/oizys-nim/src/oizys/nix.nim +++ b/pkgs/oizys-nim/src/oizys/nix.nim @@ -110,9 +110,8 @@ proc toBuildNixosConfiguration(): seq[string] = var cmd = nixCommand("build") cmd.addArg "--dry-run" cmd.addArgs nixosConfigAttrs() - debug "trying with ouptut" - discard execCmd(cmd) - let (_, err) = runCmdCaptWithSpinner(cmd, "running dry run build for: " & getHosts().join(" ")) + # let (_, err) = runCmdCaptWithSpinner(cmd, "running dry run build for: " & getHosts().join(" ")) + let (_, err, _) = runCmdCapt(cmd) let output = parseDryRunOutput err return output.toBuild.mapIt(it.storePath)