mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-14 08:24:45 +00:00
fail early when a broken -schema-location template is given
This commit is contained in:
parent
905f5e7417
commit
651d3b2c50
5 changed files with 32 additions and 8 deletions
|
|
@ -65,7 +65,7 @@ func realMain() int {
|
|||
return 1
|
||||
}
|
||||
|
||||
v := validator.New(cfg.SchemaLocations, validator.Opts{
|
||||
v, err := validator.New(cfg.SchemaLocations, validator.Opts{
|
||||
SkipTLS: cfg.SkipTLS,
|
||||
SkipKinds: cfg.SkipKinds,
|
||||
RejectKinds: cfg.RejectKinds,
|
||||
|
|
@ -73,6 +73,10 @@ func realMain() int {
|
|||
Strict: cfg.Strict,
|
||||
IgnoreMissingSchemas: cfg.IgnoreMissingSchemas,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
return 1
|
||||
}
|
||||
|
||||
validationResults := make(chan validator.Result)
|
||||
ctx := context.Background()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue