mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 16:25:19 +00:00
cmd/tree/validate: Improve scripting integration
This commit is contained in:
@@ -18,6 +18,7 @@ package cmd_tree
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
//. "github.com/mudler/luet/pkg/config"
|
//. "github.com/mudler/luet/pkg/config"
|
||||||
@@ -184,6 +185,12 @@ func NewTreeValidateCommand() *cobra.Command {
|
|||||||
fmt.Println(e)
|
fmt.Println(e)
|
||||||
}
|
}
|
||||||
fmt.Println("Broken packages:", brokenPkgs)
|
fmt.Println("Broken packages:", brokenPkgs)
|
||||||
|
|
||||||
|
if brokenPkgs > 0 {
|
||||||
|
os.Exit(1)
|
||||||
|
} else {
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user