cmd/tree/validate: Improve scripting integration

This commit is contained in:
Daniele Rondina
2020-03-14 17:38:57 +01:00
parent d6182cba3b
commit f02c54a274

View File

@@ -18,6 +18,7 @@ package cmd_tree
import (
"fmt"
"os"
"sort"
//. "github.com/mudler/luet/pkg/config"
@@ -184,6 +185,12 @@ func NewTreeValidateCommand() *cobra.Command {
fmt.Println(e)
}
fmt.Println("Broken packages:", brokenPkgs)
if brokenPkgs > 0 {
os.Exit(1)
} else {
os.Exit(0)
}
},
}