mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
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:
+2
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user