fix: log useful error message when failed walking through the file tree (#592)
Fixes #590
This commit is contained in:
parent
255d92064e
commit
53ad91607a
|
|
@ -1021,7 +1021,10 @@ func chartNameWithoutRepository(chart string) string {
|
||||||
// find "Chart.yaml"
|
// find "Chart.yaml"
|
||||||
func findChartDirectory(topLevelDir string) (string, error) {
|
func findChartDirectory(topLevelDir string) (string, error) {
|
||||||
var files []string
|
var files []string
|
||||||
filepath.Walk(topLevelDir, func(path string, f os.FileInfo, _ error) error {
|
filepath.Walk(topLevelDir, func(path string, f os.FileInfo, err error) error {
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("error walking through %s: %v", path, err)
|
||||||
|
}
|
||||||
if !f.IsDir() {
|
if !f.IsDir() {
|
||||||
r, err := regexp.MatchString("Chart.yaml", f.Name())
|
r, err := regexp.MatchString("Chart.yaml", f.Name())
|
||||||
if err == nil && r {
|
if err == nil && r {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue