From 44fce5c155446ef85a589c73a94b868a9afbcc45 Mon Sep 17 00:00:00 2001 From: Michael Feher Date: Tue, 14 Jan 2025 11:02:44 -0500 Subject: [PATCH] chore(cmd): move logger to top of cmd loop --- internal/system/cmds.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/system/cmds.go b/internal/system/cmds.go index e021cadd..fba2afd1 100644 --- a/internal/system/cmds.go +++ b/internal/system/cmds.go @@ -57,13 +57,14 @@ func Run(args []string) (string, error) { func RunAll(list CmdsList) error { // Run each installation command for _, args := range list { + log.Debug(fmt.Sprintf("%s: %s", style.Green.Render("Running"), strings.Join(args, " "))) cmd := exec.Command(args[0], args[1:]...) output, err := cmd.CombinedOutput() if err != nil { log.Error(fmt.Sprintf("%s: %s", style.Red.Render("Failed"), strings.Join(args, " "))) return fmt.Errorf(CmdFailedErrorMsg, strings.Join(args, " "), output, err) } - log.Debug(fmt.Sprintf("%s: %s", style.Green.Render("Running"), strings.Join(args, " "))) + } return nil }