mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
added error message
This commit is contained in:
@@ -57,6 +57,9 @@ func (c SetterCreator) Create(openAPIPath, resourcesPath string) error {
|
|||||||
if err := sd.AddToFile(openAPIPath); err != nil {
|
if err := sd.AddToFile(openAPIPath); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if sd.Count == 0 {
|
||||||
|
fmt.Errorf("The setter you created does not match any fields.")
|
||||||
|
}
|
||||||
|
|
||||||
// Load the updated definitions
|
// Load the updated definitions
|
||||||
if err := openapi.AddSchemaFromFile(openAPIPath); err != nil {
|
if err := openapi.AddSchemaFromFile(openAPIPath); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user