mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
capture stderr with nixos-rebuild
This commit is contained in:
parent
ee0b137279
commit
8347ad4a55
2 changed files with 3 additions and 2 deletions
|
@ -19,3 +19,4 @@ restic-gdrive
|
||||||
gitea
|
gitea
|
||||||
lock
|
lock
|
||||||
code
|
code
|
||||||
|
comma-with-db
|
||||||
|
|
|
@ -23,10 +23,10 @@ const nixosSubcmds* =
|
||||||
repl build-vm build-vm-with-bootloader list-generations""".splitWhitespace()
|
repl build-vm build-vm-with-bootloader list-generations""".splitWhitespace()
|
||||||
|
|
||||||
proc nixosRebuild*(subcmd: string, rest: seq[string] = @[]) =
|
proc nixosRebuild*(subcmd: string, rest: seq[string] = @[]) =
|
||||||
var cmd = fmt"sudo nixos-rebuild {subcmd} --flake {getFlake()} --log-format multiline"
|
|
||||||
if getHosts().len > 1:
|
if getHosts().len > 1:
|
||||||
error "nixos-rebuild only supports one host"
|
error "nixos-rebuild only supports one host"
|
||||||
quit QuitFailure
|
quit QuitFailure
|
||||||
|
var cmd = fmt"sudo nixos-rebuild {subcmd} --flake {getFlake()} --log-format multiline"
|
||||||
cmd.addArgs rest
|
cmd.addArgs rest
|
||||||
quitWithCmd cmd
|
quitWithCmd cmd
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ proc nixBuildHostDry*(minimal: bool, rest: seq[string]) =
|
||||||
cmd.addArg "--dry-run"
|
cmd.addArg "--dry-run"
|
||||||
cmd.addArgs rest
|
cmd.addArgs rest
|
||||||
let (_, err) =
|
let (_, err) =
|
||||||
runCmdCaptWithSpinner(cmd, "evaluating derivation for: " & getHosts().join(" "))
|
runCmdCaptWithSpinner(cmd, "evaluating derivation for: " & getHosts().join(" "), {CaptStderr})
|
||||||
let output = parseDryRunOutput err
|
let output = parseDryRunOutput err
|
||||||
display output
|
display output
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue