mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 20:21:20 +00:00
add validation in kubectl create if no file in directory
This commit is contained in:
@@ -212,6 +212,9 @@ func (b *Builder) Path(recursive bool, paths ...string) *Builder {
|
|||||||
|
|
||||||
b.paths = append(b.paths, visitors...)
|
b.paths = append(b.paths, visitors...)
|
||||||
}
|
}
|
||||||
|
if len(b.paths) == 0 && len(b.errs) == 0 {
|
||||||
|
b.errs = append(b.errs, fmt.Errorf("error reading %v: recognized file extensions are %v", paths, FileExtensions))
|
||||||
|
}
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user