⚙️ Fixup corner case when templating requires

Adds also specific tests to cover that area
This commit is contained in:
Ettore Di Giacinto
2022-04-28 12:57:34 +02:00
parent 2aa4c8a42e
commit b5da2fa7b4
12 changed files with 122 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ func BuildCollectionParser(srcDir, currentpath, name string, templates []string,
compileDefPath := pack.Rel(CompilerDefinitionFile)
if fileHelper.Exists(compileDefPath) {
raw := packsRaw.Find(pack.GetName(), pack.GetCategory(), pack.GetVersion())
raw := packsRaw.Find(pack)
buildyaml, err := ioutil.ReadFile(compileDefPath)
if err != nil {
return errors.Wrap(err, "Error reading file "+currentpath)
@@ -113,7 +113,7 @@ func RuntimeCollectionParser(srcDir, currentpath, name string, templates []strin
compileDefPath := p.Rel(CompilerDefinitionFile)
if fileHelper.Exists(compileDefPath) {
raw := packsRaw.Find(p.GetName(), p.GetCategory(), p.GetVersion())
raw := packsRaw.Find(p)
buildyaml, err := ioutil.ReadFile(compileDefPath)
if err != nil {
return errors.Wrap(err, "Error reading file "+currentpath)