refactor(recipe): remove direct usage of config.RECIPE_DIR

This commit is contained in:
2024-07-08 13:38:29 +02:00
parent f14d49cc64
commit 87ecc05962
17 changed files with 82 additions and 117 deletions

View File

@ -460,11 +460,9 @@ func LintSecretLengths(recipe recipe.Recipe) (bool, error) {
}
func LintValidTags(recipe recipe.Recipe) (bool, error) {
recipeDir := path.Join(config.RECIPES_DIR, recipe.Name)
repo, err := git.PlainOpen(recipeDir)
repo, err := git.PlainOpen(recipe.Dir)
if err != nil {
return false, fmt.Errorf("unable to open %s: %s", recipeDir, err)
return false, fmt.Errorf("unable to open %s: %s", recipe.Dir, err)
}
iter, err := repo.Tags()