mirror of https://github.com/k3s-io/k3s
add validation in kubectl create if no file in directory
parent
637cc0a8ba
commit
a9086f9b4f
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue