mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -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
|
||||
lock
|
||||
code
|
||||
comma-with-db
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue