Add failed/success output to spec validate (#1471)

This commit is contained in:
Anubhav
2019-12-20 12:00:47 +08:00
committed by Ta-Ching Chen
parent 0274ceb312
commit 5eaf11b8aa
3 changed files with 28 additions and 18 deletions
+5 -1
View File
@@ -116,11 +116,15 @@ func (opts *ApplySubCommand) run(input cli.Input) error {
return errors.Wrap(err, "error reading specs")
}
var warnings []string
// validate
err = fr.Validate(input)
warnings, err = fr.Validate(input)
if err != nil {
return errors.Wrap(err, "error validating specs")
}
for _, warning := range warnings {
console.Warn(warning)
}
// make changes to the cluster based on the specs
pkgMetas, as, err := applyResources(opts.Client(), specDir, fr, deleteResources)