From bf843e9fcd1d498e36defbfd9fc491de141d31d0 Mon Sep 17 00:00:00 2001 From: "Nahuel J. Sacchetti" Date: Tue, 15 Oct 2024 17:00:13 -0500 Subject: [PATCH] feat: clean command code --- compiler/backend.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/compiler/backend.go b/compiler/backend.go index bcde7e1..56014b6 100644 --- a/compiler/backend.go +++ b/compiler/backend.go @@ -29,11 +29,9 @@ func BackendRun() { } if Stanczyk.options.run { - b := new(strings.Builder) - cmd := exec.Command("./output") - cmd.Stdout = b - cmd.Run() - fmt.Print(b.String()) + stdout, err := exec.Command("./output").Output() + CheckError(err, "backend.go-3") + fmt.Print(string(stdout)) if Stanczyk.options.clean { _, _ = exec.Command("rm", "output").Output()