mirror of
https://github.com/mudler/luet.git
synced 2025-08-31 06:35:12 +00:00
cmd/tree/validate: Improve scripting integration
This commit is contained in:
@@ -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)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user