mirror of https://github.com/digarok/Appy.git
show colorized output when assembly fails
This commit is contained in:
parent
95e5685072
commit
f5ca105aea
|
@ -5,6 +5,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
|
"github.com/fatih/color"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,11 +22,10 @@ func Assemble() {
|
||||||
for _, filename := range filesToAssemble {
|
for _, filename := range filesToAssemble {
|
||||||
fmt.Printf("Assembling %v\n", filename)
|
fmt.Printf("Assembling %v\n", filename)
|
||||||
|
|
||||||
cmd := exec.Command(Merlin32Path, "-V", filename)
|
out, err := exec.Command(Merlin32Path, "-V", filename).Output()
|
||||||
|
|
||||||
err := cmd.Run()
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
color.Cyan(string(out))
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
go.mod
1
go.mod
|
@ -3,6 +3,7 @@ module github.com/digarok/appy
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/fatih/color v1.10.0 // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/spf13/cobra v1.1.3 // indirect
|
github.com/spf13/cobra v1.1.3 // indirect
|
||||||
github.com/spf13/viper v1.7.1 // indirect
|
github.com/spf13/viper v1.7.1 // indirect
|
||||||
|
|
Loading…
Reference in New Issue