tree/compiler_recipe: Return right error message

This commit is contained in:
Daniele Rondina
2020-03-08 16:28:12 +01:00
parent 8c972403a3
commit f4a5a97cff

View File

@@ -80,11 +80,15 @@ func (r *CompilerRecipe) Load(path string) error {
if helpers.Exists(compileDefPath) {
dat, err = ioutil.ReadFile(compileDefPath)
if err != nil {
return errors.Wrap(err, "Error reading file "+currentpath)
return errors.Wrap(err,
"Error reading file "+CompilerDefinitionFile+" from "+
filepath.Dir(currentpath))
}
packbuild, err := pkg.DefaultPackageFromYaml(dat)
if err != nil {
return errors.Wrap(err, "Error reading yaml "+currentpath)
return errors.Wrap(err,
"Error reading yaml "+CompilerDefinitionFile+" from "+
filepath.Dir(currentpath))
}
pack.Requires(packbuild.GetRequires())
pack.Conflicts(packbuild.GetConflicts())