From 610d339b5913726addcfedd9e6d99ca9302eb060 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 7 May 2024 09:51:15 -0500 Subject: [PATCH] use "host" instead path --- pkgs/oizys/oizys-go/pkg/oizys/oizys.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/oizys/oizys-go/pkg/oizys/oizys.go b/pkgs/oizys/oizys-go/pkg/oizys/oizys.go index 03e448e..684717f 100644 --- a/pkgs/oizys/oizys-go/pkg/oizys/oizys.go +++ b/pkgs/oizys/oizys-go/pkg/oizys/oizys.go @@ -67,21 +67,25 @@ func ParseDryRunOutput(nixOutput string) { } func NixDryRun(flake string, host string) { + output := termenv.NewOutput(os.Stdout) path := Output(flake, host) cmd := exec.Command("nix", "build", path, "--dry-run") s := spinner.New( spinner.CharSets[14], 100*time.Millisecond, - spinner.WithSuffix(" evaluating derivation for: "+path), + spinner.WithSuffix( + fmt.Sprintf("%s %s", " evaluating derivation for:", + output.String(host).Bold().Foreground(output.Color("6")), + )), spinner.WithColor("fgHiMagenta")) s.Start() - output, err := cmd.CombinedOutput() + result, err := cmd.CombinedOutput() s.Stop() if err != nil { - fmt.Println(string(output)) + fmt.Println(string(result)) log.Fatal(err) } - ParseDryRunOutput(string(output)) + ParseDryRunOutput(string(result)) } func NixosRebuild(subcmd string, flake string, rest ...string) {