Fix: add handle of ".yml" type in readviewfile function (#4172)

handle of files of type ".yml" is ignored in the original function

Signed-off-by: HanMengnan <1448189829@qq.com>
This commit is contained in:
Siege Lion
2022-06-15 00:29:16 +08:00
committed by GitHub
parent 0c190ef329
commit a9210487fa
+2 -1
View File
@@ -422,9 +422,10 @@ func readViewFile(a *InstallPackage, reader AsyncReader, readPath string) error
switch filepath.Ext(filename) {
case ".cue":
a.CUEViews = append(a.CUEViews, ElementFile{Data: b, Name: filepath.Base(readPath)})
case ".yaml":
case ".yaml", ".yml":
a.YAMLViews = append(a.YAMLViews, ElementFile{Data: b, Name: filepath.Base(readPath)})
default:
// skip other file formats
}
return nil
}