mirror of https://github.com/grafana/grafana.git
Kinds: check for entries length (#104231)
This commit is contained in:
parent
3c6da3f241
commit
5a34447ad9
|
@ -173,6 +173,9 @@ func loadCueFiles(ctx *cue.Context, dirs []os.DirEntry) ([]codegen.SchemaForGen,
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(entries) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
// It's assuming that we only have one file in each folder
|
// It's assuming that we only have one file in each folder
|
||||||
entry := filepath.Join(dir.Name(), entries[0].Name())
|
entry := filepath.Join(dir.Name(), entries[0].Name())
|
||||||
cueFile, err := os.ReadFile(entry)
|
cueFile, err := os.ReadFile(entry)
|
||||||
|
|
Loading…
Reference in New Issue