show colorized output when assembly fails

This commit is contained in:
Dagen Brock committed 2021-04-27 15:54:22 -05:00
1 parent 95e5685072
commit f5ca105aea
2 files changed
+4 -3

No files matched your search

+3 -3
View File
@@ -5,6 +5,7 @@ import (
"log"
"os/exec"
"github.com/fatih/color"
"github.com/spf13/viper"
)
@@ -21,11 +22,10 @@ func Assemble() {
for _, filename := range filesToAssemble {
fmt.Printf("Assembling %v\n", filename)
cmd := exec.Command(Merlin32Path, "-V", filename)
err := cmd.Run()
out, err := exec.Command(Merlin32Path, "-V", filename).Output()
if err != nil {
color.Cyan(string(out))
log.Fatal(err)
}
}
+1
View File
@@ -3,6 +3,7 @@ module github.com/digarok/appy
go 1.16
require (
github.com/fatih/color v1.10.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/spf13/cobra v1.1.3 // indirect
github.com/spf13/viper v1.7.1 // indirect