fix broken test - check build/repo object is not nil

This commit is contained in:
Eoin McAfee 2021-06-07 10:27:45 +01:00
parent cfa3a20395
commit 460df004a7

View file

@ -21,8 +21,12 @@ func Parse(req *core.ConvertArgs, template *core.Template, templateData map[stri
vm.ErrorFormatter.SetMaxStackTraceSize(20)
//map build/repo parameters
mapBuild(req.Build, vm)
mapRepo(req.Repo, vm)
if req.Build != nil {
mapBuild(req.Build, vm)
}
if req.Repo != nil {
mapRepo(req.Repo, vm)
}
var jsonnetFile string
var jsonentFileName string