tree/compiler_recipe: Handle invalid tree path

If instead of abs path is used bash annotation
now return an error related to wrong directory
supply.
This commit is contained in:
Daniele Rondina
2020-03-08 15:47:40 +01:00
parent 82a17a1a22
commit 8c972403a3

View File

@@ -56,6 +56,10 @@ func (r *CompilerRecipe) Load(path string) error {
// the function that handles each file or dir
var ff = func(currentpath string, info os.FileInfo, err error) error {
if err != nil {
return errors.Wrap(err, "Error on walk path "+currentpath)
}
if info.Name() != DefinitionFile {
return nil // Skip with no errors
}