From 8c972403a34065958a4b9f1bfbd55f2803713739 Mon Sep 17 00:00:00 2001 From: Daniele Rondina Date: Sun, 8 Mar 2020 15:47:40 +0100 Subject: [PATCH] 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. --- pkg/tree/compiler_recipe.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tree/compiler_recipe.go b/pkg/tree/compiler_recipe.go index bd364058..ebd9efdd 100644 --- a/pkg/tree/compiler_recipe.go +++ b/pkg/tree/compiler_recipe.go @@ -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 }