From 8347ad4a5580f162840c88afbb5acaf8f55fb934 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 9 Sep 2024 09:30:53 -0500 Subject: [PATCH] capture stderr with nixos-rebuild --- pkgs/oizys-nim/src/oizys/ignored.txt | 1 + pkgs/oizys-nim/src/oizys/nix.nim | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/oizys-nim/src/oizys/ignored.txt b/pkgs/oizys-nim/src/oizys/ignored.txt index 7693d95..a9c558b 100644 --- a/pkgs/oizys-nim/src/oizys/ignored.txt +++ b/pkgs/oizys-nim/src/oizys/ignored.txt @@ -19,3 +19,4 @@ restic-gdrive gitea lock code +comma-with-db diff --git a/pkgs/oizys-nim/src/oizys/nix.nim b/pkgs/oizys-nim/src/oizys/nix.nim index b49bcbc..68a0364 100644 --- a/pkgs/oizys-nim/src/oizys/nix.nim +++ b/pkgs/oizys-nim/src/oizys/nix.nim @@ -23,10 +23,10 @@ const nixosSubcmds* = repl build-vm build-vm-with-bootloader list-generations""".splitWhitespace() proc nixosRebuild*(subcmd: string, rest: seq[string] = @[]) = - var cmd = fmt"sudo nixos-rebuild {subcmd} --flake {getFlake()} --log-format multiline" if getHosts().len > 1: error "nixos-rebuild only supports one host" quit QuitFailure + var cmd = fmt"sudo nixos-rebuild {subcmd} --flake {getFlake()} --log-format multiline" cmd.addArgs rest quitWithCmd cmd @@ -217,7 +217,7 @@ proc nixBuildHostDry*(minimal: bool, rest: seq[string]) = cmd.addArg "--dry-run" cmd.addArgs rest let (_, err) = - runCmdCaptWithSpinner(cmd, "evaluating derivation for: " & getHosts().join(" ")) + runCmdCaptWithSpinner(cmd, "evaluating derivation for: " & getHosts().join(" "), {CaptStderr}) let output = parseDryRunOutput err display output